<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE MagicHash #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE UnboxedTuples #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE BlockArguments #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE BangPatterns #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE MultiWayIf #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE LambdaCase #-}</span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE PolyKinds #-}</span><span>
</span><span id="line-10"></span><span class="hs-pragma">{-# LANGUAGE KindSignatures #-}</span><span>
</span><span id="line-11"></span><span class="hs-pragma">{-# LANGUAGE BinaryLiterals #-}</span><span>
</span><span id="line-12"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-name-shadowing #-}</span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-comment">-- | Multi-precision natural</span><span>
</span><span id="line-15"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Num.BigNat</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;MachDeps.h&quot;
</span><span class="hs-cpp">#include &quot;WordSize.h&quot;
</span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#"><span class="hs-identifier">GHC.Prim</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#"><span class="hs-identifier">GHC.Types</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#"><span class="hs-identifier">GHC.Classes</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Magic.html#"><span class="hs-identifier">GHC.Magic</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html"><span class="hs-identifier">GHC.Num.Primitives</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html"><span class="hs-identifier">GHC.Num.WordArray</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.Backend.html"><span class="hs-identifier">GHC.Num.Backend</span></a></span><span class="hs-cpp">

#if WORD_SIZE_IN_BITS &lt; 64
</span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">GHC.IntWord64</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-32"></span><span class="hs-keyword">default</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-comment">-- | A BigNat</span><span>
</span><span id="line-35"></span><span class="hs-comment">--</span><span>
</span><span id="line-36"></span><span class="hs-comment">-- Represented as an array of limbs (Word#) stored in little-endian order (Word#</span><span>
</span><span id="line-37"></span><span class="hs-comment">-- themselves use machine order).</span><span>
</span><span id="line-38"></span><span class="hs-comment">--</span><span>
</span><span id="line-39"></span><span class="hs-comment">-- Invariant (canonical representation): higher Word# is non-zero.</span><span>
</span><span id="line-40"></span><span class="hs-comment">--</span><span>
</span><span id="line-41"></span><span class="hs-comment">-- As a consequence, zero is represented with a WordArray# whose size is 0.</span><span>
</span><span id="line-42"></span><span class="hs-keyword">type</span><span> </span><span id="BigNat%23"><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-var">BigNat#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-43"></span><span>   </span><span class="hs-comment">-- we use a type-alias instead of an unlifted newtype to make Integer/Natural</span><span>
</span><span id="line-44"></span><span>   </span><span class="hs-comment">-- types easier to wire in the compiler</span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span class="hs-comment">-- | A lifted BigNat</span><span>
</span><span id="line-47"></span><span class="hs-comment">--</span><span>
</span><span id="line-48"></span><span class="hs-comment">-- Represented as an array of limbs (Word#) stored in little-endian order (Word#</span><span>
</span><span id="line-49"></span><span class="hs-comment">-- themselves use machine order).</span><span>
</span><span id="line-50"></span><span class="hs-comment">--</span><span>
</span><span id="line-51"></span><span class="hs-comment">-- Invariant (canonical representation): higher Word# is non-zero.</span><span>
</span><span id="line-52"></span><span class="hs-comment">--</span><span>
</span><span id="line-53"></span><span class="hs-comment">-- As a consequence, zero is represented with a WordArray# whose size is 0.</span><span>
</span><span id="line-54"></span><span class="hs-keyword">data</span><span> </span><span id="BigNat"><span class="annot"><a href="GHC.Num.BigNat.html#BigNat"><span class="hs-identifier hs-var">BigNat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="BN%23"><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-var">BN#</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="unBigNat"><span class="annot"><span class="annottext">BigNat -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#unBigNat"><span class="hs-identifier hs-var hs-var">unBigNat</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="hs-comment">-- Note [Why Void#?]</span><span>
</span><span id="line-57"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-58"></span><span class="hs-comment">--</span><span>
</span><span id="line-59"></span><span class="hs-comment">-- We can't have top-level BigNat# for now because they are unlifted ByteArray#</span><span>
</span><span id="line-60"></span><span class="hs-comment">-- (see #17521). So we use functions that take an empty argument Void# that</span><span>
</span><span id="line-61"></span><span class="hs-comment">-- will be discarded at compile time.</span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span class="hs-comment">-- | Check that the BigNat is valid</span><span>
</span><span id="line-65"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatCheck%23"><span class="hs-identifier hs-type">bigNatCheck#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-66"></span><span id="bigNatCheck%23"><span class="annot"><span class="annottext">bigNatCheck# :: BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatCheck%23"><span class="hs-identifier hs-var hs-var">bigNatCheck#</span></a></span></span><span> </span><span id="local-6989586621679034550"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034550"><span class="hs-identifier hs-var">bn</span></a></span></span><span>
</span><span id="line-67"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034550"><span class="hs-identifier hs-var">bn</span></a></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-68"></span><span>   </span><span class="hs-comment">-- check that size is a multiple of Word size</span><span>
</span><span id="line-69"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679034548"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034548"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#remInt%23"><span class="hs-identifier hs-var">remInt#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#sizeofByteArray%23"><span class="hs-identifier hs-var">sizeofByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034550"><span class="hs-identifier hs-var">bn</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BYTES#</span><span>
</span><span id="line-70"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034548"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2F%3D%23"><span class="hs-operator hs-var">/=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>                            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-71"></span><span>   </span><span class="hs-comment">-- check that most-significant limb isn't zero</span><span>
</span><span id="line-72"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034550"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034550"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-73"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                                          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-comment">-- | Check that the BigNat is valid</span><span>
</span><span id="line-76"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatCheck"><span class="hs-identifier hs-type">bigNatCheck</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-77"></span><span id="bigNatCheck"><span class="annot"><span class="annottext">bigNatCheck :: BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatCheck"><span class="hs-identifier hs-var hs-var">bigNatCheck</span></a></span></span><span> </span><span id="local-6989586621679034544"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034544"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatCheck%23"><span class="hs-identifier hs-var">bigNatCheck#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034544"><span class="hs-identifier hs-var">bn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span class="hs-comment">-- | Number of words in the BigNat</span><span>
</span><span id="line-80"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatSize"><span class="hs-identifier hs-type">bigNatSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-81"></span><span id="bigNatSize"><span class="annot"><span class="annottext">bigNatSize :: BigNat# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatSize"><span class="hs-identifier hs-var hs-var">bigNatSize</span></a></span></span><span> </span><span id="local-6989586621679034542"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034542"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034542"><span class="hs-identifier hs-var">bn</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-comment">-- | Number of words in the BigNat</span><span>
</span><span id="line-84"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-type">bigNatSize#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-85"></span><span id="bigNatSize%23"><span class="annot"><span class="annottext">bigNatSize# :: BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var hs-var">bigNatSize#</span></a></span></span><span> </span><span id="local-6989586621679034541"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034541"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034541"><span class="hs-identifier hs-var">ba</span></a></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatZero"><span class="hs-pragma hs-type">bigNatZero</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-88"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatZero"><span class="hs-identifier hs-type">bigNatZero</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat"><span class="hs-identifier hs-type">BigNat</span></a></span><span>
</span><span id="line-89"></span><span id="bigNatZero"><span class="annot"><span class="annottext">bigNatZero :: BigNat
</span><a href="GHC.Num.BigNat.html#bigNatZero"><span class="hs-identifier hs-var hs-var">bigNatZero</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat
</span><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-var">BN#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679034537"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034537"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034537"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatOne"><span class="hs-pragma hs-type">bigNatOne</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-92"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatOne"><span class="hs-identifier hs-type">bigNatOne</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat"><span class="hs-identifier hs-type">BigNat</span></a></span><span>
</span><span id="line-93"></span><span id="bigNatOne"><span class="annot"><span class="annottext">bigNatOne :: BigNat
</span><a href="GHC.Num.BigNat.html#bigNatOne"><span class="hs-identifier hs-var hs-var">bigNatOne</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat
</span><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-var">BN#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span class="hs-comment">-- | BigNat Zero</span><span>
</span><span id="line-96"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-type">bigNatZero#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Void%23"><span class="hs-identifier hs-type">Void#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-comment">-- cf Note [Why Void#?]</span><span>
</span><span id="line-97"></span><span id="bigNatZero%23"><span class="annot"><span class="annottext">bigNatZero# :: Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var hs-var">bigNatZero#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Void#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat
</span><a href="GHC.Num.BigNat.html#bigNatZero"><span class="hs-identifier hs-var">bigNatZero</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-98"></span><span>   </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679034533"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034533"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034533"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="hs-comment">-- | BigNat one</span><span>
</span><span id="line-101"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatOne%23"><span class="hs-identifier hs-type">bigNatOne#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Void%23"><span class="hs-identifier hs-type">Void#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-comment">-- cf Note [Why Void#?]</span><span>
</span><span id="line-102"></span><span id="bigNatOne%23"><span class="annot"><span class="annottext">bigNatOne# :: Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatOne%23"><span class="hs-identifier hs-var hs-var">bigNatOne#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Void#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat
</span><a href="GHC.Num.BigNat.html#bigNatOne"><span class="hs-identifier hs-var">bigNatOne</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-103"></span><span>   </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679034531"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034531"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034531"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="annot"><a href="GHC.Num.BigNat.html#raiseDivZero_BigNat"><span class="hs-identifier hs-type">raiseDivZero_BigNat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Void%23"><span class="hs-identifier hs-type">Void#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-106"></span><span id="raiseDivZero_BigNat"><span class="annot"><span class="annottext">raiseDivZero_BigNat :: Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#raiseDivZero_BigNat"><span class="hs-identifier hs-var hs-var">raiseDivZero_BigNat</span></a></span></span><span> </span><span class="annot"><span class="annottext">Void#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Any
forall a. a
</span><a href="../../ghc-prim/src/GHC.Prim.Exception.html#raiseDivZero"><span class="hs-identifier hs-var">raiseDivZero</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-107"></span><span>   </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">Any
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-108"></span><span>   </span><span class="hs-comment">-- see Note [ghc-bignum exceptions] in GHC.Num.Primitives</span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span class="hs-comment">-- | Indicate if a bigNat is zero</span><span>
</span><span id="line-111"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-type">bigNatIsZero</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-112"></span><span id="bigNatIsZero"><span class="annot"><span class="annottext">bigNatIsZero :: BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var hs-var">bigNatIsZero</span></a></span></span><span> </span><span id="local-6989586621679034528"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034528"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatIsZero%23"><span class="hs-identifier hs-var">bigNatIsZero#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034528"><span class="hs-identifier hs-var">bn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span class="hs-comment">-- | Indicate if a bigNat is zero</span><span>
</span><span id="line-115"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatIsZero%23"><span class="hs-identifier hs-type">bigNatIsZero#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-116"></span><span id="bigNatIsZero%23"><span class="annot"><span class="annottext">bigNatIsZero# :: BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatIsZero%23"><span class="hs-identifier hs-var hs-var">bigNatIsZero#</span></a></span></span><span> </span><span id="local-6989586621679034526"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034526"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034526"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-comment">-- | Indicate if a bigNat is one</span><span>
</span><span id="line-119"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-type">bigNatIsOne</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-120"></span><span id="bigNatIsOne"><span class="annot"><span class="annottext">bigNatIsOne :: BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var hs-var">bigNatIsOne</span></a></span></span><span> </span><span id="local-6989586621679034524"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034524"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatIsOne%23"><span class="hs-identifier hs-var">bigNatIsOne#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034524"><span class="hs-identifier hs-var">bn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span class="hs-comment">-- | Indicate if a bigNat is one</span><span>
</span><span id="line-123"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatIsOne%23"><span class="hs-identifier hs-type">bigNatIsOne#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-124"></span><span id="bigNatIsOne%23"><span class="annot"><span class="annottext">bigNatIsOne# :: BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatIsOne%23"><span class="hs-identifier hs-var hs-var">bigNatIsOne#</span></a></span></span><span> </span><span id="local-6989586621679034522"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034522"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-125"></span><span>   </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034522"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-126"></span><span>   </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#%26%26%23"><span class="hs-operator hs-var">&amp;&amp;#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034522"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="hs-comment">-- | Indicate if a bigNat is two</span><span>
</span><span id="line-129"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatIsTwo"><span class="hs-identifier hs-type">bigNatIsTwo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-130"></span><span id="bigNatIsTwo"><span class="annot"><span class="annottext">bigNatIsTwo :: BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsTwo"><span class="hs-identifier hs-var hs-var">bigNatIsTwo</span></a></span></span><span> </span><span id="local-6989586621679034519"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034519"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatIsTwo%23"><span class="hs-identifier hs-var">bigNatIsTwo#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034519"><span class="hs-identifier hs-var">bn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span class="hs-comment">-- | Indicate if a bigNat is two</span><span>
</span><span id="line-133"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatIsTwo%23"><span class="hs-identifier hs-type">bigNatIsTwo#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-134"></span><span id="bigNatIsTwo%23"><span class="annot"><span class="annottext">bigNatIsTwo# :: BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatIsTwo%23"><span class="hs-identifier hs-var hs-var">bigNatIsTwo#</span></a></span></span><span> </span><span id="local-6989586621679034517"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034517"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-135"></span><span>   </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034517"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-136"></span><span>   </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#%26%26%23"><span class="hs-operator hs-var">&amp;&amp;#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034517"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">2##</span></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-- | Indicate if the value is a power of two and which one</span><span>
</span><span id="line-139"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatIsPowerOf2%23"><span class="hs-identifier hs-type">bigNatIsPowerOf2#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-140"></span><span id="bigNatIsPowerOf2%23"><span class="annot"><span class="annottext">bigNatIsPowerOf2# :: BigNat# -&gt; (# (# #) | Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatIsPowerOf2%23"><span class="hs-identifier hs-var hs-var">bigNatIsPowerOf2#</span></a></span></span><span> </span><span id="local-6989586621679034515"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034515"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-141"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034515"><span class="hs-identifier hs-var">a</span></a></span><span>                      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-142"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; (# (# #) | Word# #)
</span><a href="GHC.Num.Primitives.html#wordIsPowerOf2%23"><span class="hs-identifier hs-var">wordIsPowerOf2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034513"><span class="hs-identifier hs-var">msw</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-143"></span><span>               </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-144"></span><span>               </span><span class="hs-special">(#</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679034512"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034512"><span class="hs-identifier hs-var">c</span></a></span></span><span>  </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool#
</span><a href="#local-6989586621679034511"><span class="hs-identifier hs-var">checkAllZeroes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034510"><span class="hs-identifier hs-var">imax</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-145"></span><span>                  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-146"></span><span>                  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034512"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span>
</span><span id="line-147"></span><span>                              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034510"><span class="hs-identifier hs-var">imax</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-148"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-149"></span><span>      </span><span id="local-6989586621679034513"><span class="annot"><span class="annottext">msw :: Word#
</span><a href="#local-6989586621679034513"><span class="hs-identifier hs-var hs-var">msw</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034515"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034510"><span class="hs-identifier hs-var">imax</span></a></span><span>
</span><span id="line-150"></span><span>      </span><span id="local-6989586621679034509"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034509"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034515"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-151"></span><span>      </span><span id="local-6989586621679034510"><span class="annot"><span class="annottext">imax :: Bool#
</span><a href="#local-6989586621679034510"><span class="hs-identifier hs-var hs-var">imax</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034509"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-152"></span><span>      </span><span id="local-6989586621679034511"><span class="annot"><span class="annottext">checkAllZeroes :: Bool# -&gt; Bool#
</span><a href="#local-6989586621679034511"><span class="hs-identifier hs-var hs-var">checkAllZeroes</span></a></span></span><span> </span><span id="local-6989586621679034508"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034508"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-153"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034508"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-154"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034515"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034508"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-155"></span><span>                     </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool#
</span><a href="#local-6989586621679034511"><span class="hs-identifier hs-var">checkAllZeroes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034508"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span>                     </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="hs-comment">-- | Return the Word# at the given index</span><span>
</span><span id="line-159"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-type">bigNatIndex#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-160"></span><span id="bigNatIndex%23"><span class="annot"><span class="annottext">bigNatIndex# :: BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var hs-var">bigNatIndex#</span></a></span></span><span> </span><span id="local-6989586621679034507"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034507"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679034506"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034506"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034507"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034506"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span class="hs-comment">-- | Return the Word# at the given index</span><span>
</span><span id="line-163"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatIndex"><span class="hs-identifier hs-type">bigNatIndex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-164"></span><span id="bigNatIndex"><span class="annot"><span class="annottext">bigNatIndex :: BigNat# -&gt; Bool# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatIndex"><span class="hs-identifier hs-var hs-var">bigNatIndex</span></a></span></span><span> </span><span id="local-6989586621679034504"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034504"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span id="local-6989586621679034503"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034503"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034504"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034503"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-167"></span><span class="hs-comment">-- Conversion</span><span>
</span><span id="line-168"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span class="hs-comment">-- | Create a BigNat from a Word</span><span>
</span><span id="line-171"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWord"><span class="hs-identifier hs-type">bigNatFromWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-172"></span><span id="bigNatFromWord"><span class="annot"><span class="annottext">bigNatFromWord :: Word -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord"><span class="hs-identifier hs-var hs-var">bigNatFromWord</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034501"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034501"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034501"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span class="hs-comment">-- | Create a BigNat from a Word</span><span>
</span><span id="line-175"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-type">bigNatFromWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-176"></span><span id="bigNatFromWord%23"><span class="annot"><span class="annottext">bigNatFromWord# :: Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var hs-var">bigNatFromWord#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-177"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span id="local-6989586621679034500"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034500"><span class="hs-identifier hs-var">w</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#wordArrayFromWord%23"><span class="hs-identifier hs-var">wordArrayFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034500"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-178"></span><span>
</span><span id="line-179"></span><span class="hs-comment">-- | Convert a list of non-zero Words (most-significant first) into a BigNat</span><span>
</span><span id="line-180"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWordList"><span class="hs-identifier hs-type">bigNatFromWordList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-181"></span><span id="bigNatFromWordList"><span class="annot"><span class="annottext">bigNatFromWordList :: [Word] -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWordList"><span class="hs-identifier hs-var hs-var">bigNatFromWordList</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679034497"><span class="annot"><span class="annottext">[Word]
</span><a href="#local-6989586621679034497"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word] -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWordList"><span class="hs-identifier hs-var">bigNatFromWordList</span></a></span><span> </span><span class="annot"><span class="annottext">[Word]
</span><a href="#local-6989586621679034497"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-182"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWordList"><span class="hs-identifier hs-var">bigNatFromWordList</span></a></span><span> </span><span id="local-6989586621679034496"><span class="annot"><span class="annottext">[Word]
</span><a href="#local-6989586621679034496"><span class="hs-identifier hs-var">xs</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word] -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWordListUnsafe"><span class="hs-identifier hs-var">bigNatFromWordListUnsafe</span></a></span><span> </span><span class="annot"><span class="annottext">[Word]
</span><a href="#local-6989586621679034496"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="hs-comment">-- | Convert a list of non-zero Words (most-significant first) into a BigNat</span><span>
</span><span id="line-185"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWordList%23"><span class="hs-identifier hs-type">bigNatFromWordList#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-186"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWordList%23"><span class="hs-pragma hs-type">bigNatFromWordList#</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-187"></span><span id="bigNatFromWordList%23"><span class="annot"><span class="annottext">bigNatFromWordList# :: [Word] -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWordList%23"><span class="hs-identifier hs-var hs-var">bigNatFromWordList#</span></a></span></span><span> </span><span id="local-6989586621679034494"><span class="annot"><span class="annottext">[Word]
</span><a href="#local-6989586621679034494"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word] -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWordList"><span class="hs-identifier hs-var">bigNatFromWordList</span></a></span><span> </span><span class="annot"><span class="annottext">[Word]
</span><a href="#local-6989586621679034494"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span class="hs-comment">-- | Return the absolute value of the Int# in a BigNat</span><span>
</span><span id="line-190"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromAbsInt%23"><span class="hs-identifier hs-type">bigNatFromAbsInt#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-191"></span><span id="bigNatFromAbsInt%23"><span class="annot"><span class="annottext">bigNatFromAbsInt# :: Bool# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromAbsInt%23"><span class="hs-identifier hs-var hs-var">bigNatFromAbsInt#</span></a></span></span><span> </span><span id="local-6989586621679034492"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034492"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromAbsInt%23"><span class="hs-identifier hs-var">wordFromAbsInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034492"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-192"></span><span>
</span><span id="line-193"></span><span class="hs-comment">-- | Convert a list of non-zero Words (most-significant first) into a BigNat.</span><span>
</span><span id="line-194"></span><span class="hs-comment">-- Don't remove most-significant zero words</span><span>
</span><span id="line-195"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWordListUnsafe"><span class="hs-identifier hs-type">bigNatFromWordListUnsafe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-196"></span><span id="bigNatFromWordListUnsafe"><span class="annot"><span class="annottext">bigNatFromWordListUnsafe :: [Word] -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWordListUnsafe"><span class="hs-identifier hs-var hs-var">bigNatFromWordListUnsafe</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-197"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWordListUnsafe"><span class="hs-identifier hs-var">bigNatFromWordListUnsafe</span></a></span><span> </span><span id="local-6989586621679034490"><span class="annot"><span class="annottext">[Word]
</span><a href="#local-6989586621679034490"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-198"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-199"></span><span>      </span><span id="local-6989586621679034489"><span class="annot"><span class="annottext">length :: Bool# -&gt; [a] -&gt; Bool#
</span><a href="#local-6989586621679034489"><span class="hs-identifier hs-var hs-var">length</span></a></span></span><span> </span><span id="local-6989586621679034488"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034488"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034488"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-200"></span><span>      </span><span class="annot"><a href="#local-6989586621679034489"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span id="local-6989586621679034487"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034487"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679034486"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679034486"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; [a] -&gt; Bool#
</span><a href="#local-6989586621679034489"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034487"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679034486"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-201"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034485"><span class="annot"><span class="annottext">lxs :: Bool#
</span><a href="#local-6989586621679034485"><span class="hs-identifier hs-var hs-var">lxs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; [Word] -&gt; Bool#
forall {a}. Bool# -&gt; [a] -&gt; Bool#
</span><a href="#local-6989586621679034489"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">[Word]
</span><a href="#local-6989586621679034490"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-202"></span><span>      </span><span id="local-6989586621679034484"><span class="annot"><span class="annottext">writeWordList :: MutableWordArray# s -&gt; Bool# -&gt; [Word] -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679034484"><span class="hs-identifier hs-var hs-var">writeWordList</span></a></span></span><span> </span><span id="local-6989586621679034483"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679034483"><span class="hs-identifier hs-var">_mwa</span></a></span></span><span> </span><span id="local-6989586621679034482"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034482"><span class="hs-identifier hs-var">_i</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>        </span><span id="local-6989586621679034481"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034481"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034481"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-203"></span><span>      </span><span class="annot"><a href="#local-6989586621679034484"><span class="hs-identifier hs-var">writeWordList</span></a></span><span> </span><span id="local-6989586621679034480"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679034480"><span class="hs-identifier hs-var">mwa</span></a></span></span><span>   </span><span id="local-6989586621679034479"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034479"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034478"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034478"><span class="hs-identifier hs-var">w</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679034477"><span class="annot"><span class="annottext">[Word]
</span><a href="#local-6989586621679034477"><span class="hs-identifier hs-var">ws</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679034476"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034476"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-204"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679034480"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034479"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034478"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034476"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-205"></span><span>            </span><span id="local-6989586621679034474"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034474"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; [Word] -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679034484"><span class="hs-identifier hs-var">writeWordList</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679034480"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034479"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Word]
</span><a href="#local-6989586621679034477"><span class="hs-identifier hs-var">ws</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034474"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-206"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034485"><span class="hs-identifier hs-var">lxs</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034473"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034473"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-207"></span><span>            </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool# -&gt; [Word] -&gt; State# RealWorld -&gt; State# RealWorld
forall {s}.
MutableWordArray# s -&gt; Bool# -&gt; [Word] -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679034484"><span class="hs-identifier hs-var">writeWordList</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034473"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034485"><span class="hs-identifier hs-var">lxs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Word]
</span><a href="#local-6989586621679034490"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span class="hs-comment">-- | Convert a BigNat into a list of non-zero Words (most-significant first)</span><span>
</span><span id="line-210"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToWordList"><span class="hs-identifier hs-type">bigNatToWordList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-211"></span><span id="bigNatToWordList"><span class="annot"><span class="annottext">bigNatToWordList :: BigNat# -&gt; [Word]
</span><a href="GHC.Num.BigNat.html#bigNatToWordList"><span class="hs-identifier hs-var hs-var">bigNatToWordList</span></a></span></span><span> </span><span id="local-6989586621679034471"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034471"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; [Word]
</span><a href="#local-6989586621679034470"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034471"><span class="hs-identifier hs-var">bn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-213"></span><span>      </span><span id="local-6989586621679034470"><span class="annot"><span class="annottext">go :: Bool# -&gt; [Word]
</span><a href="#local-6989586621679034470"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-214"></span><span>      </span><span class="annot"><a href="#local-6989586621679034470"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679034469"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034469"><span class="hs-identifier hs-var">n</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatIndex"><span class="hs-identifier hs-var">bigNatIndex</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034471"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034469"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word -&gt; [Word] -&gt; [Word]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; [Word]
</span><a href="#local-6989586621679034470"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034469"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span>
</span><span id="line-217"></span><span class="hs-comment">-- | Convert two Word# (most-significant first) into a BigNat</span><span>
</span><span id="line-218"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWord2%23"><span class="hs-identifier hs-type">bigNatFromWord2#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-219"></span><span id="bigNatFromWord2%23"><span class="annot"><span class="annottext">bigNatFromWord2# :: Word# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord2%23"><span class="hs-identifier hs-var hs-var">bigNatFromWord2#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-220"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWord2%23"><span class="hs-identifier hs-var">bigNatFromWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span id="local-6989586621679034467"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034467"><span class="hs-identifier hs-var">l</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034467"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-221"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWord2%23"><span class="hs-identifier hs-var">bigNatFromWord2#</span></a></span><span> </span><span id="local-6989586621679034466"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034466"><span class="hs-identifier hs-var">h</span></a></span></span><span>   </span><span id="local-6989586621679034465"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034465"><span class="hs-identifier hs-var">l</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#wordArrayFromWord2%23"><span class="hs-identifier hs-var">wordArrayFromWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034466"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034465"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-222"></span><span>
</span><span id="line-223"></span><span class="hs-comment">-- | Convert a BigNat into a Word#</span><span>
</span><span id="line-224"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToWord%23"><span class="hs-identifier hs-type">bigNatToWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-225"></span><span id="bigNatToWord%23"><span class="annot"><span class="annottext">bigNatToWord# :: BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatToWord%23"><span class="hs-identifier hs-var hs-var">bigNatToWord#</span></a></span></span><span> </span><span id="local-6989586621679034462"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034462"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-226"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034462"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-227"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034462"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-228"></span><span>
</span><span id="line-229"></span><span class="hs-comment">-- | Convert a BigNat into a Word# if it fits</span><span>
</span><span id="line-230"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToWordMaybe%23"><span class="hs-identifier hs-type">bigNatToWordMaybe#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-231"></span><span id="bigNatToWordMaybe%23"><span class="annot"><span class="annottext">bigNatToWordMaybe# :: BigNat# -&gt; (# (# #) | Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToWordMaybe%23"><span class="hs-identifier hs-var hs-var">bigNatToWordMaybe#</span></a></span></span><span> </span><span id="local-6989586621679034460"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034460"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-232"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034460"><span class="hs-identifier hs-var">a</span></a></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-233"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034460"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%23"><span class="hs-operator hs-var">&gt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span>     </span><span class="hs-special">#)</span><span>
</span><span id="line-234"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                          </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034460"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span class="hs-comment">-- | Convert a BigNat into a Word</span><span>
</span><span id="line-237"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToWord"><span class="hs-identifier hs-type">bigNatToWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-238"></span><span id="bigNatToWord"><span class="annot"><span class="annottext">bigNatToWord :: BigNat# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatToWord"><span class="hs-identifier hs-var hs-var">bigNatToWord</span></a></span></span><span> </span><span id="local-6989586621679034458"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034458"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatToWord%23"><span class="hs-identifier hs-var">bigNatToWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034458"><span class="hs-identifier hs-var">bn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-239"></span><span>
</span><span id="line-240"></span><span class="hs-comment">-- | Convert a BigNat into a Int#</span><span>
</span><span id="line-241"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToInt%23"><span class="hs-identifier hs-type">bigNatToInt#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-242"></span><span id="bigNatToInt%23"><span class="annot"><span class="annottext">bigNatToInt# :: BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatToInt%23"><span class="hs-identifier hs-var hs-var">bigNatToInt#</span></a></span></span><span> </span><span id="local-6989586621679034456"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034456"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-243"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034456"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-244"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexIntArray%23"><span class="hs-identifier hs-var">indexIntArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034456"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span class="hs-comment">-- | Convert a BigNat into a Int</span><span>
</span><span id="line-247"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToInt"><span class="hs-identifier hs-type">bigNatToInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-248"></span><span id="bigNatToInt"><span class="annot"><span class="annottext">bigNatToInt :: BigNat# -&gt; Int
</span><a href="GHC.Num.BigNat.html#bigNatToInt"><span class="hs-identifier hs-var hs-var">bigNatToInt</span></a></span></span><span> </span><span id="local-6989586621679034454"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034454"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatToInt%23"><span class="hs-identifier hs-var">bigNatToInt#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034454"><span class="hs-identifier hs-var">bn</span></a></span><span class="hs-special">)</span><span class="hs-cpp">

#if WORD_SIZE_IN_BITS == 32
</span><span>
</span><span id="line-252"></span><span class="hs-comment">-- | Convert a Word64# into a BigNat on 32-bit architectures</span><span>
</span><span id="line-253"></span><span class="hs-identifier">bigNatFromWord64#</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">Word64#</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">BigNat#</span><span>
</span><span id="line-254"></span><span class="hs-identifier">bigNatFromWord64#</span><span> </span><span class="hs-identifier">w64</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">bigNatFromWord2#</span><span> </span><span class="hs-identifier">wh#</span><span> </span><span class="hs-identifier">wl#</span><span>
</span><span id="line-255"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-256"></span><span>    </span><span class="hs-identifier">wh#</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">word64ToWord#</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">uncheckedShiftRL64#</span><span> </span><span class="hs-identifier">w64</span><span> </span><span class="hs-number">32#</span><span class="hs-special">)</span><span>
</span><span id="line-257"></span><span>    </span><span class="hs-identifier">wl#</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">word64ToWord#</span><span> </span><span class="hs-identifier">w64</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="hs-comment">-- | Convert a BigNat into a Word64# on 32-bit architectures</span><span>
</span><span id="line-260"></span><span class="hs-identifier">bigNatToWord64#</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">BigNat#</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Word64#</span><span>
</span><span id="line-261"></span><span class="hs-identifier">bigNatToWord64#</span><span> </span><span class="hs-identifier">b</span><span>
</span><span id="line-262"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">bigNatIsZero</span><span> </span><span class="hs-identifier">b</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">wordToWord64#</span><span> </span><span class="hs-number">0##</span><span>
</span><span id="line-263"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">wl</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier">wordToWord64#</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">bigNatToWord#</span><span> </span><span class="hs-identifier">b</span><span class="hs-special">)</span><span>
</span><span id="line-264"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="hs-identifier">isTrue#</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">bigNatSize#</span><span> </span><span class="hs-identifier">b</span><span> </span><span class="hs-operator">&gt;#</span><span> </span><span class="hs-number">1#</span><span class="hs-special">)</span><span>
</span><span id="line-265"></span><span>      </span><span class="hs-keyword">then</span><span>
</span><span id="line-266"></span><span>         </span><span class="hs-keyword">let</span><span> </span><span class="hs-identifier">wh</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">wordToWord64#</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">bigNatIndex#</span><span> </span><span class="hs-identifier">b</span><span> </span><span class="hs-number">1#</span><span class="hs-special">)</span><span>
</span><span id="line-267"></span><span>         </span><span class="hs-keyword">in</span><span> </span><span class="hs-identifier">uncheckedShiftL64#</span><span> </span><span class="hs-identifier">wh</span><span> </span><span class="hs-number">32#</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">or64#</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">wl</span><span>
</span><span id="line-268"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="hs-identifier">wl</span><span class="hs-cpp">

#endif
</span><span>
</span><span id="line-272"></span><span class="hs-comment">-- | Encode (# BigNat mantissa, Int# exponent #) into a Double#</span><span>
</span><span id="line-273"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatEncodeDouble%23"><span class="hs-identifier hs-type">bigNatEncodeDouble#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Double%23"><span class="hs-identifier hs-type">Double#</span></a></span><span>
</span><span id="line-274"></span><span id="bigNatEncodeDouble%23"><span class="annot"><span class="annottext">bigNatEncodeDouble# :: BigNat# -&gt; Bool# -&gt; Double#
</span><a href="GHC.Num.BigNat.html#bigNatEncodeDouble%23"><span class="hs-identifier hs-var hs-var">bigNatEncodeDouble#</span></a></span></span><span> </span><span id="local-6989586621679034452"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034452"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034451"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034451"><span class="hs-identifier hs-var">e</span></a></span></span><span>
</span><span id="line-275"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034452"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-276"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Double%23"><span class="hs-identifier hs-var">word2Double#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-comment">-- FIXME: isn't it NaN on 0# exponent?</span><span>
</span><span id="line-277"></span><span>
</span><span id="line-278"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-279"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BigNat# -&gt; Bool# -&gt; Double#) -&gt; BigNat# -&gt; Bool# -&gt; Double#
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Double#
</span><a href="GHC.Num.Backend.GMP.html#bignat_encode_double"><span class="hs-identifier hs-var">bignat_encode_double</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034452"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034451"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-280"></span><span>
</span><span id="line-281"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- Predicates</span><span>
</span><span id="line-283"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span class="hs-comment">-- | Test if a BigNat is greater than a Word</span><span>
</span><span id="line-286"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatGtWord%23"><span class="hs-identifier hs-type">bigNatGtWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-287"></span><span id="bigNatGtWord%23"><span class="annot"><span class="annottext">bigNatGtWord# :: BigNat# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatGtWord%23"><span class="hs-identifier hs-var hs-var">bigNatGtWord#</span></a></span></span><span> </span><span id="local-6989586621679034448"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034448"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span id="local-6989586621679034447"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034447"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-288"></span><span>   </span><span class="annot"><span class="annottext">Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#notB%23"><span class="hs-identifier hs-var">notB#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatIsZero%23"><span class="hs-identifier hs-var">bigNatIsZero#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034448"><span class="hs-identifier hs-var">bn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-289"></span><span>   </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#%26%26%23"><span class="hs-operator hs-var">&amp;&amp;#</span></a></span><span> </span><span class="hs-special">(</span><span>   </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034448"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%23"><span class="hs-operator hs-var">&gt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-290"></span><span>       </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#%7C%7C%23"><span class="hs-operator hs-var">||#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034448"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#gtWord%23"><span class="hs-operator hs-var">`gtWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034447"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-291"></span><span>       </span><span class="hs-special">)</span><span>
</span><span id="line-292"></span><span>
</span><span id="line-293"></span><span class="hs-comment">-- | Test if a BigNat is equal to a Word</span><span>
</span><span id="line-294"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatEqWord%23"><span class="hs-identifier hs-type">bigNatEqWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-295"></span><span id="bigNatEqWord%23"><span class="annot"><span class="annottext">bigNatEqWord# :: BigNat# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatEqWord%23"><span class="hs-identifier hs-var hs-var">bigNatEqWord#</span></a></span></span><span> </span><span id="local-6989586621679034443"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034443"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span id="local-6989586621679034442"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034442"><span class="hs-identifier hs-var">w</span></a></span></span><span>
</span><span id="line-296"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034442"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-297"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatIsZero%23"><span class="hs-identifier hs-var">bigNatIsZero#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034443"><span class="hs-identifier hs-var">bn</span></a></span><span>
</span><span id="line-298"></span><span>
</span><span id="line-299"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034443"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-300"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034443"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034442"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-303"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-304"></span><span>
</span><span id="line-305"></span><span class="hs-comment">-- | Test if a BigNat is greater than a Word</span><span>
</span><span id="line-306"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatGtWord"><span class="hs-identifier hs-type">bigNatGtWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-307"></span><span id="bigNatGtWord"><span class="annot"><span class="annottext">bigNatGtWord :: BigNat# -&gt; Word -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatGtWord"><span class="hs-identifier hs-var hs-var">bigNatGtWord</span></a></span></span><span> </span><span id="local-6989586621679034440"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034440"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034439"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034439"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatGtWord%23"><span class="hs-identifier hs-var">bigNatGtWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034440"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034439"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-308"></span><span>
</span><span id="line-309"></span><span class="hs-comment">-- | Test if a BigNat is lower than or equal to a Word</span><span>
</span><span id="line-310"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLeWord%23"><span class="hs-identifier hs-type">bigNatLeWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-311"></span><span id="bigNatLeWord%23"><span class="annot"><span class="annottext">bigNatLeWord# :: BigNat# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatLeWord%23"><span class="hs-identifier hs-var hs-var">bigNatLeWord#</span></a></span></span><span> </span><span id="local-6989586621679034437"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034437"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span id="local-6989586621679034436"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034436"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#notB%23"><span class="hs-identifier hs-var">notB#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatGtWord%23"><span class="hs-identifier hs-var">bigNatGtWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034437"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034436"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-312"></span><span>
</span><span id="line-313"></span><span class="hs-comment">-- | Test if a BigNat is lower than or equal to a Word</span><span>
</span><span id="line-314"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLeWord"><span class="hs-identifier hs-type">bigNatLeWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-315"></span><span id="bigNatLeWord"><span class="annot"><span class="annottext">bigNatLeWord :: BigNat# -&gt; Word -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatLeWord"><span class="hs-identifier hs-var hs-var">bigNatLeWord</span></a></span></span><span> </span><span id="local-6989586621679034434"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034434"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034433"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034433"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatLeWord%23"><span class="hs-identifier hs-var">bigNatLeWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034434"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034433"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="hs-comment">-- | Equality test for BigNat</span><span>
</span><span id="line-318"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatEq%23"><span class="hs-identifier hs-type">bigNatEq#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-319"></span><span id="bigNatEq%23"><span class="annot"><span class="annottext">bigNatEq# :: BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatEq%23"><span class="hs-identifier hs-var hs-var">bigNatEq#</span></a></span></span><span> </span><span id="local-6989586621679034431"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034431"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679034430"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034430"><span class="hs-identifier hs-var">wb</span></a></span></span><span>
</span><span id="line-320"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034431"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2F%3D%23"><span class="hs-operator hs-var">/=#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034430"><span class="hs-identifier hs-var">wb</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-321"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034431"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-322"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BigNat# -&gt; BigNat# -&gt; Bool#) -&gt; BigNat# -&gt; BigNat# -&gt; Bool#
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.Backend.GMP.html#bignat_compare"><span class="hs-identifier hs-var">bignat_compare</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034431"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034430"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-323"></span><span>
</span><span id="line-324"></span><span class="hs-comment">-- | Equality test for BigNat</span><span>
</span><span id="line-325"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatEq"><span class="hs-identifier hs-type">bigNatEq</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-326"></span><span id="bigNatEq"><span class="annot"><span class="annottext">bigNatEq :: BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatEq"><span class="hs-identifier hs-var hs-var">bigNatEq</span></a></span></span><span> </span><span id="local-6989586621679034427"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034427"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034426"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034426"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatEq%23"><span class="hs-identifier hs-var">bigNatEq#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034427"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034426"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-327"></span><span>
</span><span id="line-328"></span><span class="hs-comment">-- | Inequality test for BigNat</span><span>
</span><span id="line-329"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatNe%23"><span class="hs-identifier hs-type">bigNatNe#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-330"></span><span id="bigNatNe%23"><span class="annot"><span class="annottext">bigNatNe# :: BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatNe%23"><span class="hs-identifier hs-var hs-var">bigNatNe#</span></a></span></span><span> </span><span id="local-6989586621679034424"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034424"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034423"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034423"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#notB%23"><span class="hs-identifier hs-var">notB#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatEq%23"><span class="hs-identifier hs-var">bigNatEq#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034424"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034423"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-331"></span><span>
</span><span id="line-332"></span><span class="hs-comment">-- | Equality test for BigNat</span><span>
</span><span id="line-333"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatNe"><span class="hs-identifier hs-type">bigNatNe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-334"></span><span id="bigNatNe"><span class="annot"><span class="annottext">bigNatNe :: BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatNe"><span class="hs-identifier hs-var hs-var">bigNatNe</span></a></span></span><span> </span><span id="local-6989586621679034421"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034421"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034420"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034420"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatNe%23"><span class="hs-identifier hs-var">bigNatNe#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034421"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034420"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span class="hs-comment">-- | Compare a BigNat and a Word#</span><span>
</span><span id="line-337"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatCompareWord%23"><span class="hs-identifier hs-type">bigNatCompareWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span>
</span><span id="line-338"></span><span id="bigNatCompareWord%23"><span class="annot"><span class="annottext">bigNatCompareWord# :: BigNat# -&gt; Word# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompareWord%23"><span class="hs-identifier hs-var hs-var">bigNatCompareWord#</span></a></span></span><span> </span><span id="local-6989586621679034418"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034418"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034417"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034417"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-339"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034418"><span class="hs-identifier hs-var">a</span></a></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Ordering
</span><a href="GHC.Num.Primitives.html#cmpW%23"><span class="hs-identifier hs-var">cmpW#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034417"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-340"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034418"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%23"><span class="hs-operator hs-var">&gt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span>
</span><span id="line-341"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-342"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Ordering
</span><a href="GHC.Num.Primitives.html#cmpW%23"><span class="hs-identifier hs-var">cmpW#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034418"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034417"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-343"></span><span>
</span><span id="line-344"></span><span class="hs-comment">-- | Compare a BigNat and a Word</span><span>
</span><span id="line-345"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatCompareWord"><span class="hs-identifier hs-type">bigNatCompareWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span>
</span><span id="line-346"></span><span id="bigNatCompareWord"><span class="annot"><span class="annottext">bigNatCompareWord :: BigNat# -&gt; Word -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompareWord"><span class="hs-identifier hs-var hs-var">bigNatCompareWord</span></a></span></span><span> </span><span id="local-6989586621679034414"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034414"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034413"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034413"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompareWord%23"><span class="hs-identifier hs-var">bigNatCompareWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034414"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034413"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-347"></span><span>
</span><span id="line-348"></span><span class="hs-comment">-- | Compare two BigNat</span><span>
</span><span id="line-349"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatCompare"><span class="hs-identifier hs-type">bigNatCompare</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span>
</span><span id="line-350"></span><span id="bigNatCompare"><span class="annot"><span class="annottext">bigNatCompare :: BigNat# -&gt; BigNat# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompare"><span class="hs-identifier hs-var hs-var">bigNatCompare</span></a></span></span><span> </span><span id="local-6989586621679034411"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034411"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034410"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034410"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-351"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-352"></span><span>      </span><span id="local-6989586621679034409"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034409"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034411"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-353"></span><span>      </span><span id="local-6989586621679034408"><span class="annot"><span class="annottext">szB :: Bool#
</span><a href="#local-6989586621679034408"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034410"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-354"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span>
</span><span id="line-355"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034409"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%23"><span class="hs-operator hs-var">&gt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034408"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span>
</span><span id="line-356"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034409"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034408"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span>
</span><span id="line-357"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034409"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span>
</span><span id="line-358"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compareInt%23"><span class="hs-identifier hs-var">compareInt#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(BigNat# -&gt; BigNat# -&gt; Bool#) -&gt; BigNat# -&gt; BigNat# -&gt; Bool#
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.Backend.GMP.html#bignat_compare"><span class="hs-identifier hs-var">bignat_compare</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034411"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034410"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span>
</span><span id="line-361"></span><span class="hs-comment">-- | Predicate: a &lt; b</span><span>
</span><span id="line-362"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLt%23"><span class="hs-identifier hs-type">bigNatLt#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-363"></span><span id="bigNatLt%23"><span class="annot"><span class="annottext">bigNatLt# :: BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatLt%23"><span class="hs-identifier hs-var hs-var">bigNatLt#</span></a></span></span><span> </span><span id="local-6989586621679034405"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034405"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034404"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034404"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-364"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompare"><span class="hs-identifier hs-var">bigNatCompare</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034405"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034404"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-365"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-366"></span><span>
</span><span id="line-367"></span><span class="hs-comment">-- | Predicate: a &lt; b</span><span>
</span><span id="line-368"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLt"><span class="hs-identifier hs-type">bigNatLt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-369"></span><span id="bigNatLt"><span class="annot"><span class="annottext">bigNatLt :: BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatLt"><span class="hs-identifier hs-var hs-var">bigNatLt</span></a></span></span><span> </span><span id="local-6989586621679034402"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034402"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034401"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034401"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatLt%23"><span class="hs-identifier hs-var">bigNatLt#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034402"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034401"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-370"></span><span>
</span><span id="line-371"></span><span class="hs-comment">-- | Predicate: a &lt;= b</span><span>
</span><span id="line-372"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLe%23"><span class="hs-identifier hs-type">bigNatLe#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-373"></span><span id="bigNatLe%23"><span class="annot"><span class="annottext">bigNatLe# :: BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatLe%23"><span class="hs-identifier hs-var hs-var">bigNatLe#</span></a></span></span><span> </span><span id="local-6989586621679034399"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034399"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034398"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034398"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-374"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompare"><span class="hs-identifier hs-var">bigNatCompare</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034399"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034398"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-375"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-376"></span><span>
</span><span id="line-377"></span><span class="hs-comment">-- | Predicate: a &lt;= b</span><span>
</span><span id="line-378"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLe"><span class="hs-identifier hs-type">bigNatLe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-379"></span><span id="bigNatLe"><span class="annot"><span class="annottext">bigNatLe :: BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatLe"><span class="hs-identifier hs-var hs-var">bigNatLe</span></a></span></span><span> </span><span id="local-6989586621679034396"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034396"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034395"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034395"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatLe%23"><span class="hs-identifier hs-var">bigNatLe#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034396"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034395"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-380"></span><span>
</span><span id="line-381"></span><span class="hs-comment">-- | Predicate: a &gt; b</span><span>
</span><span id="line-382"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatGt%23"><span class="hs-identifier hs-type">bigNatGt#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-383"></span><span id="bigNatGt%23"><span class="annot"><span class="annottext">bigNatGt# :: BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatGt%23"><span class="hs-identifier hs-var hs-var">bigNatGt#</span></a></span></span><span> </span><span id="local-6989586621679034393"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034393"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034392"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034392"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-384"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompare"><span class="hs-identifier hs-var">bigNatCompare</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034393"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034392"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-385"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-386"></span><span>
</span><span id="line-387"></span><span class="hs-comment">-- | Predicate: a &gt; b</span><span>
</span><span id="line-388"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatGt"><span class="hs-identifier hs-type">bigNatGt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-389"></span><span id="bigNatGt"><span class="annot"><span class="annottext">bigNatGt :: BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatGt"><span class="hs-identifier hs-var hs-var">bigNatGt</span></a></span></span><span> </span><span id="local-6989586621679034390"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034390"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034389"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034389"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatGt%23"><span class="hs-identifier hs-var">bigNatGt#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034390"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034389"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-390"></span><span>
</span><span id="line-391"></span><span class="hs-comment">-- | Predicate: a &gt;= b</span><span>
</span><span id="line-392"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatGe%23"><span class="hs-identifier hs-type">bigNatGe#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-393"></span><span id="bigNatGe%23"><span class="annot"><span class="annottext">bigNatGe# :: BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatGe%23"><span class="hs-identifier hs-var hs-var">bigNatGe#</span></a></span></span><span> </span><span id="local-6989586621679034387"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034387"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034386"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034386"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-394"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompare"><span class="hs-identifier hs-var">bigNatCompare</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034387"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034386"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-395"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-396"></span><span>
</span><span id="line-397"></span><span class="hs-comment">-- | Predicate: a &gt;= b</span><span>
</span><span id="line-398"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatGe"><span class="hs-identifier hs-type">bigNatGe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-399"></span><span id="bigNatGe"><span class="annot"><span class="annottext">bigNatGe :: BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatGe"><span class="hs-identifier hs-var hs-var">bigNatGe</span></a></span></span><span> </span><span id="local-6989586621679034384"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034384"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034383"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034383"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatGe%23"><span class="hs-identifier hs-var">bigNatGe#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034384"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034383"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-400"></span><span>
</span><span id="line-401"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-402"></span><span class="hs-comment">-- Addition</span><span>
</span><span id="line-403"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-404"></span><span>
</span><span id="line-405"></span><span class="hs-comment">-- | Add a bigNat and a Word#</span><span>
</span><span id="line-406"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatAddWord%23"><span class="hs-identifier hs-type">bigNatAddWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-407"></span><span id="bigNatAddWord%23"><span class="annot"><span class="annottext">bigNatAddWord# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatAddWord%23"><span class="hs-identifier hs-var hs-var">bigNatAddWord#</span></a></span></span><span> </span><span id="local-6989586621679034381"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034381"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034380"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034380"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-408"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034380"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-409"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034381"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-410"></span><span>
</span><span id="line-411"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034381"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-412"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034380"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-413"></span><span>
</span><span id="line-414"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-415"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034381"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034378"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034378"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034377"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034377"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-416"></span><span>         </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; Word#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_add_word"><span class="hs-identifier hs-var">bignat_add_word</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034378"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034381"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034380"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034377"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-417"></span><span>
</span><span id="line-418"></span><span class="hs-comment">-- | Add a bigNat and a Word</span><span>
</span><span id="line-419"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatAddWord"><span class="hs-identifier hs-type">bigNatAddWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-420"></span><span id="bigNatAddWord"><span class="annot"><span class="annottext">bigNatAddWord :: BigNat# -&gt; Word -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatAddWord"><span class="hs-identifier hs-var hs-var">bigNatAddWord</span></a></span></span><span> </span><span id="local-6989586621679034374"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034374"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034373"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034373"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatAddWord%23"><span class="hs-identifier hs-var">bigNatAddWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034374"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034373"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-421"></span><span>
</span><span id="line-422"></span><span class="hs-comment">-- | Add two bigNats</span><span>
</span><span id="line-423"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatAdd"><span class="hs-identifier hs-type">bigNatAdd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-424"></span><span id="bigNatAdd"><span class="annot"><span class="annottext">bigNatAdd :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatAdd"><span class="hs-identifier hs-var hs-var">bigNatAdd</span></a></span></span><span> </span><span id="local-6989586621679034371"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034371"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034370"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034370"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-425"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034371"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034370"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-426"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034370"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034371"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-427"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-428"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-429"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034369"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034369"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034371"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-430"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034368"><span class="annot"><span class="annottext">szB :: Bool#
</span><a href="#local-6989586621679034368"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034370"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-431"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034367"><span class="annot"><span class="annottext">szMax :: Bool#
</span><a href="#local-6989586621679034367"><span class="hs-identifier hs-var hs-var">szMax</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#maxI%23"><span class="hs-identifier hs-var">maxI#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034369"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034368"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-432"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034365"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034365"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034367"><span class="hs-identifier hs-var">szMax</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-comment">-- for the potential carry</span><span>
</span><span id="line-433"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034365"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034364"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034364"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034363"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034363"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-434"></span><span>         </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_add"><span class="hs-identifier hs-var">bignat_add</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034364"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034371"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034370"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034363"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-435"></span><span>
</span><span id="line-436"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-437"></span><span class="hs-comment">-- Multiplication</span><span>
</span><span id="line-438"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-439"></span><span>
</span><span id="line-440"></span><span class="hs-comment">-- | Multiply a BigNat by a Word#</span><span>
</span><span id="line-441"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatMulWord%23"><span class="hs-identifier hs-type">bigNatMulWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-442"></span><span id="bigNatMulWord%23"><span class="annot"><span class="annottext">bigNatMulWord# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatMulWord%23"><span class="hs-identifier hs-var hs-var">bigNatMulWord#</span></a></span></span><span> </span><span id="local-6989586621679034360"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034360"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034359"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034359"><span class="hs-identifier hs-var">w</span></a></span></span><span>
</span><span id="line-443"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034359"><span class="hs-identifier hs-var">w</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-444"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034359"><span class="hs-identifier hs-var">w</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034360"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-445"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034360"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-446"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span>  </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034360"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034359"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-447"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034360"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-448"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#timesWord2%23"><span class="hs-identifier hs-var">timesWord2#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034360"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034359"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-449"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034358"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034358"><span class="hs-identifier hs-var">h</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679034357"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034357"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord2%23"><span class="hs-identifier hs-var">bigNatFromWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034358"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034357"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-450"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034360"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034356"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034356"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034355"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034355"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-451"></span><span>               </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; Word#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_mul_word"><span class="hs-identifier hs-var">bignat_mul_word</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034356"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034360"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034359"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034355"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-452"></span><span>
</span><span id="line-453"></span><span class="hs-comment">-- | Multiply a BigNAt by a Word</span><span>
</span><span id="line-454"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatMulWord"><span class="hs-identifier hs-type">bigNatMulWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-455"></span><span id="bigNatMulWord"><span class="annot"><span class="annottext">bigNatMulWord :: BigNat# -&gt; Word -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatMulWord"><span class="hs-identifier hs-var hs-var">bigNatMulWord</span></a></span></span><span> </span><span id="local-6989586621679034352"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034352"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034351"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034351"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatMulWord%23"><span class="hs-identifier hs-var">bigNatMulWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034352"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034351"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-456"></span><span>
</span><span id="line-457"></span><span class="hs-comment">-- | Square a BigNat</span><span>
</span><span id="line-458"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatSqr"><span class="hs-identifier hs-type">bigNatSqr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-459"></span><span id="bigNatSqr"><span class="annot"><span class="annottext">bigNatSqr :: BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatSqr"><span class="hs-identifier hs-var hs-var">bigNatSqr</span></a></span></span><span> </span><span id="local-6989586621679034349"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034349"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatMul"><span class="hs-identifier hs-var">bigNatMul</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034349"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034349"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-460"></span><span>   </span><span class="hs-comment">-- This can be replaced by a backend primitive in the future (e.g. to use</span><span>
</span><span id="line-461"></span><span>   </span><span class="hs-comment">-- GMP's mpn_sqr)</span><span>
</span><span id="line-462"></span><span>
</span><span id="line-463"></span><span class="hs-comment">-- | Multiplication (classical algorithm)</span><span>
</span><span id="line-464"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatMul"><span class="hs-identifier hs-type">bigNatMul</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-465"></span><span id="bigNatMul"><span class="annot"><span class="annottext">bigNatMul :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatMul"><span class="hs-identifier hs-var hs-var">bigNatMul</span></a></span></span><span> </span><span id="local-6989586621679034347"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034347"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034346"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034346"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-466"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatSize"><span class="hs-identifier hs-var">bigNatSize</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034346"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word -&gt; Word -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatSize"><span class="hs-identifier hs-var">bigNatSize</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034347"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatMul"><span class="hs-identifier hs-var">bigNatMul</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034346"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034347"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-comment">-- optimize loops</span><span>
</span><span id="line-467"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034347"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034347"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-468"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034346"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034346"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-469"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span>  </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034347"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034346"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-470"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span>  </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034346"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034347"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-471"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-472"></span><span>      </span><span class="hs-keyword">let</span><span>
</span><span id="line-473"></span><span>         </span><span class="hs-glyph">!</span><span id="local-6989586621679034344"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034344"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034347"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-474"></span><span>         </span><span class="hs-glyph">!</span><span id="local-6989586621679034343"><span class="annot"><span class="annottext">szB :: Bool#
</span><a href="#local-6989586621679034343"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034346"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-475"></span><span>         </span><span class="hs-glyph">!</span><span id="local-6989586621679034342"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034342"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034344"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034343"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-476"></span><span>      </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034342"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034341"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034341"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034340"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034340"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-477"></span><span>            </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_mul"><span class="hs-identifier hs-var">bignat_mul</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034341"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034347"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034346"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034340"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-478"></span><span>
</span><span id="line-479"></span><span>
</span><span id="line-480"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-481"></span><span class="hs-comment">-- Subtraction</span><span>
</span><span id="line-482"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-483"></span><span>
</span><span id="line-484"></span><span class="hs-comment">-- | Subtract a Word# from a BigNat</span><span>
</span><span id="line-485"></span><span class="hs-comment">--</span><span>
</span><span id="line-486"></span><span class="hs-comment">-- The BigNat must be bigger than the Word#.</span><span>
</span><span id="line-487"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatSubWordUnsafe%23"><span class="hs-identifier hs-type">bigNatSubWordUnsafe#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-488"></span><span id="bigNatSubWordUnsafe%23"><span class="annot"><span class="annottext">bigNatSubWordUnsafe# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatSubWordUnsafe%23"><span class="hs-identifier hs-var hs-var">bigNatSubWordUnsafe#</span></a></span></span><span> </span><span id="local-6989586621679034337"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034337"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679034336"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034336"><span class="hs-identifier hs-var">y</span></a></span></span><span>
</span><span id="line-489"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034336"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034337"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-490"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034335"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034334"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034334"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Word# -&gt; Bool# -&gt; State# RealWorld -&gt; State# RealWorld
forall {s}.
MutableByteArray# s -&gt; Word# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679034333"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034334"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034336"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-491"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-492"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034335"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034335"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034337"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-493"></span><span>
</span><span id="line-494"></span><span>      </span><span id="local-6989586621679034333"><span class="annot"><span class="annottext">go :: MutableByteArray# s -&gt; Word# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679034333"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679034332"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679034332"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034331"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034331"><span class="hs-identifier hs-var">carry</span></a></span></span><span> </span><span id="local-6989586621679034330"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034330"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679034329"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034329"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-495"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034330"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034335"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-496"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034329"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-497"></span><span>
</span><span id="line-498"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034331"><span class="hs-identifier hs-var">carry</span></a></span><span>
</span><span id="line-499"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
-&gt; Bool# -&gt; BigNat# -&gt; Bool# -&gt; Bool# -&gt; State# s -&gt; State# s
forall s.
MutableByteArray# s
-&gt; Bool# -&gt; BigNat# -&gt; Bool# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679034332"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034330"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034337"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034330"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034335"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034330"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034329"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-500"></span><span>
</span><span id="line-501"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-502"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Bool# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#subWordC%23"><span class="hs-identifier hs-var">subWordC#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034337"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034330"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034331"><span class="hs-identifier hs-var">carry</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-503"></span><span>            </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034327"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034327"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679034326"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034326"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679034332"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034330"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034327"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034329"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-504"></span><span>                              </span><span id="local-6989586621679034325"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034325"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s -&gt; Word# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679034333"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679034332"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034326"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034330"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679034325"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-505"></span><span>
</span><span id="line-506"></span><span class="hs-comment">-- | Subtract a Word# from a BigNat</span><span>
</span><span id="line-507"></span><span class="hs-comment">--</span><span>
</span><span id="line-508"></span><span class="hs-comment">-- The BigNat must be bigger than the Word#.</span><span>
</span><span id="line-509"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatSubWordUnsafe"><span class="hs-identifier hs-type">bigNatSubWordUnsafe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-510"></span><span id="bigNatSubWordUnsafe"><span class="annot"><span class="annottext">bigNatSubWordUnsafe :: BigNat# -&gt; Word -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatSubWordUnsafe"><span class="hs-identifier hs-var hs-var">bigNatSubWordUnsafe</span></a></span></span><span> </span><span id="local-6989586621679034323"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034323"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034322"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034322"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatSubWordUnsafe%23"><span class="hs-identifier hs-var">bigNatSubWordUnsafe#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034323"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034322"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-511"></span><span>
</span><span id="line-512"></span><span class="hs-comment">-- | Subtract a Word# from a BigNat</span><span>
</span><span id="line-513"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatSubWord%23"><span class="hs-identifier hs-type">bigNatSubWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-514"></span><span id="bigNatSubWord%23"><span class="annot"><span class="annottext">bigNatSubWord# :: BigNat# -&gt; Word# -&gt; (# (# #) | BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatSubWord%23"><span class="hs-identifier hs-var hs-var">bigNatSubWord#</span></a></span></span><span> </span><span id="local-6989586621679034320"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034320"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034319"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034319"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-515"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034319"><span class="hs-identifier hs-var">b</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034320"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-516"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034320"><span class="hs-identifier hs-var">a</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-517"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-518"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; (# State# RealWorld, Bool# #))
-&gt; (# (# #) | BigNat# #)
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimedMaybe%23"><span class="hs-identifier hs-var">withNewWordArrayTrimedMaybe#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034320"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034317"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034317"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034316"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034316"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-519"></span><span>            </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat#
 -&gt; Word#
 -&gt; State# RealWorld
 -&gt; (# State# RealWorld, Bool# #))
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; Word#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Bool# #)
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; Word#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Bool# #)
</span><a href="GHC.Num.Backend.GMP.html#bignat_sub_word"><span class="hs-identifier hs-var">bignat_sub_word</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034317"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034320"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034319"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034316"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-520"></span><span>
</span><span id="line-521"></span><span>
</span><span id="line-522"></span><span class="hs-comment">-- | Subtract two BigNat (don't check if a &gt;= b)</span><span>
</span><span id="line-523"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatSubUnsafe"><span class="hs-identifier hs-type">bigNatSubUnsafe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-524"></span><span id="bigNatSubUnsafe"><span class="annot"><span class="annottext">bigNatSubUnsafe :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatSubUnsafe"><span class="hs-identifier hs-var hs-var">bigNatSubUnsafe</span></a></span></span><span> </span><span id="local-6989586621679034313"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034313"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034312"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034312"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-525"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034312"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034313"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-526"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-527"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679034311"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034311"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034313"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-528"></span><span>      </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034311"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034310"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034310"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034309"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034309"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-529"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat#
 -&gt; BigNat#
 -&gt; State# RealWorld
 -&gt; (# State# RealWorld, Bool# #))
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Bool# #)
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Bool# #)
</span><a href="GHC.Num.Backend.GMP.html#bignat_sub"><span class="hs-identifier hs-var">bignat_sub</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034310"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034313"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034312"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034309"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-530"></span><span>               </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034307"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034307"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034307"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-531"></span><span>               </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034306"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034306"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Any
forall a. a
</span><a href="../../ghc-prim/src/GHC.Prim.Exception.html#raiseUnderflow"><span class="hs-identifier hs-var">raiseUnderflow</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-532"></span><span>                                 </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">Any
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034306"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-533"></span><span>                                 </span><span class="hs-comment">-- see Note [ghc-bignum exceptions] in</span><span>
</span><span id="line-534"></span><span>                                 </span><span class="hs-comment">-- GHC.Num.Primitives</span><span>
</span><span id="line-535"></span><span>
</span><span id="line-536"></span><span class="hs-comment">-- | Subtract two BigNat</span><span>
</span><span id="line-537"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatSub"><span class="hs-identifier hs-type">bigNatSub</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-538"></span><span id="bigNatSub"><span class="annot"><span class="annottext">bigNatSub :: BigNat# -&gt; BigNat# -&gt; (# (# #) | BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatSub"><span class="hs-identifier hs-var hs-var">bigNatSub</span></a></span></span><span> </span><span id="local-6989586621679034304"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034304"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034303"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034303"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-539"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034303"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034304"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-540"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034304"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034303"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-541"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-542"></span><span>
</span><span id="line-543"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-544"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; (# State# RealWorld, Bool# #))
-&gt; (# (# #) | BigNat# #)
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimedMaybe%23"><span class="hs-identifier hs-var">withNewWordArrayTrimedMaybe#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034304"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034302"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034302"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034301"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034301"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-545"></span><span>            </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat#
 -&gt; BigNat#
 -&gt; State# RealWorld
 -&gt; (# State# RealWorld, Bool# #))
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Bool# #)
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Bool# #)
</span><a href="GHC.Num.Backend.GMP.html#bignat_sub"><span class="hs-identifier hs-var">bignat_sub</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034302"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034304"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034303"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034301"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-546"></span><span>
</span><span id="line-547"></span><span>
</span><span id="line-548"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-549"></span><span class="hs-comment">-- Division</span><span>
</span><span id="line-550"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-551"></span><span>
</span><span id="line-552"></span><span class="hs-comment">-- | Divide a BigNat by a Word, return the quotient</span><span>
</span><span id="line-553"></span><span class="hs-comment">--</span><span>
</span><span id="line-554"></span><span class="hs-comment">-- Require:</span><span>
</span><span id="line-555"></span><span class="hs-comment">--    b /= 0</span><span>
</span><span id="line-556"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatQuotWord%23"><span class="hs-identifier hs-type">bigNatQuotWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-557"></span><span id="bigNatQuotWord%23"><span class="annot"><span class="annottext">bigNatQuotWord# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatQuotWord%23"><span class="hs-identifier hs-var hs-var">bigNatQuotWord#</span></a></span></span><span> </span><span id="local-6989586621679034299"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034299"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034298"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034298"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-558"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034298"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034299"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-559"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034298"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#raiseDivZero_BigNat"><span class="hs-identifier hs-var">raiseDivZero_BigNat</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-560"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-561"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-562"></span><span>      </span><span id="local-6989586621679034297"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034297"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034299"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-563"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034297"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034296"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034296"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679034295"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034295"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-564"></span><span>         </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; Word#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_quot_word"><span class="hs-identifier hs-var">bignat_quot_word</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034296"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034299"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034298"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034295"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-565"></span><span>
</span><span id="line-566"></span><span class="hs-comment">-- | Divide a BigNat by a Word, return the quotient</span><span>
</span><span id="line-567"></span><span class="hs-comment">--</span><span>
</span><span id="line-568"></span><span class="hs-comment">-- Require:</span><span>
</span><span id="line-569"></span><span class="hs-comment">--    b /= 0</span><span>
</span><span id="line-570"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatQuotWord"><span class="hs-identifier hs-type">bigNatQuotWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-571"></span><span id="bigNatQuotWord"><span class="annot"><span class="annottext">bigNatQuotWord :: BigNat# -&gt; Word -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatQuotWord"><span class="hs-identifier hs-var hs-var">bigNatQuotWord</span></a></span></span><span> </span><span id="local-6989586621679034292"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034292"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034291"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034291"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatQuotWord%23"><span class="hs-identifier hs-var">bigNatQuotWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034292"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034291"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-572"></span><span>
</span><span id="line-573"></span><span class="hs-comment">-- | Divide a BigNat by a Word, return the remainder</span><span>
</span><span id="line-574"></span><span class="hs-comment">--</span><span>
</span><span id="line-575"></span><span class="hs-comment">-- Require:</span><span>
</span><span id="line-576"></span><span class="hs-comment">--    b /= 0</span><span>
</span><span id="line-577"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatRemWord%23"><span class="hs-identifier hs-type">bigNatRemWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-578"></span><span id="bigNatRemWord%23"><span class="annot"><span class="annottext">bigNatRemWord# :: BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatRemWord%23"><span class="hs-identifier hs-var hs-var">bigNatRemWord#</span></a></span></span><span> </span><span id="local-6989586621679034289"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034289"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034288"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034288"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-579"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034288"><span class="hs-identifier hs-var">b</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#raiseDivZero_Word%23"><span class="hs-identifier hs-var">raiseDivZero_Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-580"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034288"><span class="hs-identifier hs-var">b</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-581"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034289"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-582"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BigNat# -&gt; Word# -&gt; Word#) -&gt; BigNat# -&gt; Word# -&gt; Word#
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_rem_word"><span class="hs-identifier hs-var">bignat_rem_word</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034289"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034288"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-583"></span><span>
</span><span id="line-584"></span><span class="hs-comment">-- | Divide a BigNat by a Word, return the remainder</span><span>
</span><span id="line-585"></span><span class="hs-comment">--</span><span>
</span><span id="line-586"></span><span class="hs-comment">-- Require:</span><span>
</span><span id="line-587"></span><span class="hs-comment">--    b /= 0</span><span>
</span><span id="line-588"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatRemWord"><span class="hs-identifier hs-type">bigNatRemWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-589"></span><span id="bigNatRemWord"><span class="annot"><span class="annottext">bigNatRemWord :: BigNat# -&gt; Word -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatRemWord"><span class="hs-identifier hs-var hs-var">bigNatRemWord</span></a></span></span><span> </span><span id="local-6989586621679034284"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034284"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034283"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034283"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatRemWord%23"><span class="hs-identifier hs-var">bigNatRemWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034284"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034283"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-590"></span><span>
</span><span id="line-591"></span><span class="hs-comment">-- | QuotRem a BigNat by a Word</span><span>
</span><span id="line-592"></span><span class="hs-comment">--</span><span>
</span><span id="line-593"></span><span class="hs-comment">-- Require:</span><span>
</span><span id="line-594"></span><span class="hs-comment">--    b /= 0</span><span>
</span><span id="line-595"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatQuotRemWord%23"><span class="hs-identifier hs-type">bigNatQuotRemWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-596"></span><span id="bigNatQuotRemWord%23"><span class="annot"><span class="annottext">bigNatQuotRemWord# :: BigNat# -&gt; Word# -&gt; (# BigNat#, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatQuotRemWord%23"><span class="hs-identifier hs-var hs-var">bigNatQuotRemWord#</span></a></span></span><span> </span><span id="local-6989586621679034281"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034281"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034280"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034280"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-597"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034280"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Any
forall a. a
</span><a href="../../ghc-prim/src/GHC.Prim.Exception.html#raiseDivZero"><span class="hs-identifier hs-var">raiseDivZero</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-598"></span><span>                  </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">Any
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-599"></span><span>                  </span><span class="hs-comment">-- see Note [ghc-bignum exceptions] in GHC.Num.Primitives</span><span>
</span><span id="line-600"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034280"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034281"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-601"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034281"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-602"></span><span>   </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679034279"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034279"><span class="hs-identifier hs-var">a0</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034281"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-603"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compareWord%23"><span class="hs-identifier hs-var">compareWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034279"><span class="hs-identifier hs-var">a0</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034280"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-604"></span><span>      </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034279"><span class="hs-identifier hs-var">a0</span></a></span><span>  </span><span class="hs-special">#)</span><span>
</span><span id="line-605"></span><span>      </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatOne%23"><span class="hs-identifier hs-var">bigNatOne#</span></a></span><span>  </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-606"></span><span>      </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#quotRemWord%23"><span class="hs-identifier hs-var">quotRemWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034279"><span class="hs-identifier hs-var">a0</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034280"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-607"></span><span>               </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034277"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034277"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679034276"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034276"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034277"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034276"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-608"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-609"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-610"></span><span>      </span><span id="local-6989586621679034275"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034275"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034281"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-611"></span><span>      </span><span id="local-6989586621679034274"><span class="annot"><span class="annottext">io :: State# RealWorld -&gt; (# State# RealWorld, (# BigNat#, Word# #) #)
</span><a href="#local-6989586621679034274"><span class="hs-identifier hs-var hs-var">io</span></a></span></span><span> </span><span id="local-6989586621679034273"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034273"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-612"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, MutableWordArray# RealWorld #)
forall s. Bool# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="GHC.Num.WordArray.html#newWordArray%23"><span class="hs-identifier hs-var">newWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034275"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034273"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034271"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034271"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679034270"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034270"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-613"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat#
 -&gt; Word#
 -&gt; State# RealWorld
 -&gt; (# State# RealWorld, Word# #))
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; Word#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Word# #)
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; Word#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Backend.GMP.html#bignat_quotrem_word"><span class="hs-identifier hs-var">bignat_quotrem_word</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034270"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034281"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034280"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034271"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034268"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034268"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679034267"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034267"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">#)</span><span>  </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-614"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaTrimZeroes%23"><span class="hs-identifier hs-var">mwaTrimZeroes#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034270"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034268"><span class="hs-identifier hs-var">s2</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679034265"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034265"><span class="hs-identifier hs-var">s3</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-615"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; State# RealWorld -&gt; (# State# RealWorld, BigNat# #)
forall d.
MutableByteArray# d -&gt; State# d -&gt; (# State# d, BigNat# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#unsafeFreezeByteArray%23"><span class="hs-identifier hs-var">unsafeFreezeByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034270"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034265"><span class="hs-identifier hs-var">s3</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034264"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034264"><span class="hs-identifier hs-var">s4</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679034263"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034263"><span class="hs-identifier hs-var">wq</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-616"></span><span>         </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034264"><span class="hs-identifier hs-var">s4</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034263"><span class="hs-identifier hs-var">wq</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034267"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-617"></span><span>         </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span>
</span><span id="line-618"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(State# RealWorld -&gt; (# State# RealWorld, (# BigNat#, Word# #) #))
-&gt; (# State# RealWorld, (# BigNat#, Word# #) #)
forall o. (State# RealWorld -&gt; o) -&gt; o
</span><a href="../../ghc-prim/src/GHC.Magic.html#runRW%23"><span class="hs-identifier hs-var">runRW#</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld -&gt; (# State# RealWorld, (# BigNat#, Word# #) #)
</span><a href="#local-6989586621679034274"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-619"></span><span>         </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034262"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034262"><span class="hs-identifier hs-var">wq</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679034261"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034261"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034262"><span class="hs-identifier hs-var">wq</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034261"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-620"></span><span>
</span><span id="line-621"></span><span>
</span><span id="line-622"></span><span class="hs-comment">-- | BigNat division returning (quotient,remainder)</span><span>
</span><span id="line-623"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatQuotRem%23"><span class="hs-identifier hs-type">bigNatQuotRem#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-624"></span><span id="bigNatQuotRem%23"><span class="annot"><span class="annottext">bigNatQuotRem# :: BigNat# -&gt; BigNat# -&gt; (# BigNat#, BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatQuotRem%23"><span class="hs-identifier hs-var hs-var">bigNatQuotRem#</span></a></span></span><span> </span><span id="local-6989586621679034259"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034259"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034258"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034258"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-625"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034258"><span class="hs-identifier hs-var">b</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Any
forall a. a
</span><a href="../../ghc-prim/src/GHC.Prim.Exception.html#raiseDivZero"><span class="hs-identifier hs-var">raiseDivZero</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-626"></span><span>                                 </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">Any
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-627"></span><span>                                 </span><span class="hs-comment">-- see Note [ghc-bignum exceptions] in GHC.Num.Primitives</span><span>
</span><span id="line-628"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034259"><span class="hs-identifier hs-var">a</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-629"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034258"><span class="hs-identifier hs-var">b</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034259"><span class="hs-identifier hs-var">a</span></a></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-630"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679034257"><span class="hs-identifier hs-var">cmp</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034259"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-631"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679034257"><span class="hs-identifier hs-var">cmp</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatOne%23"><span class="hs-identifier hs-var">bigNatOne#</span></a></span><span>  </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-632"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034256"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; (# BigNat#, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatQuotRemWord%23"><span class="hs-identifier hs-var">bigNatQuotRemWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034259"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034258"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-633"></span><span>                                 </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034255"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034255"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679034254"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034254"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034255"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034254"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-634"></span><span>
</span><span id="line-635"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; MutableWordArray# RealWorld
    -&gt; State# RealWorld
    -&gt; State# RealWorld)
-&gt; (# BigNat#, BigNat# #)
</span><a href="GHC.Num.WordArray.html#withNewWordArray2Trimed%23"><span class="hs-identifier hs-var">withNewWordArray2Trimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034252"><span class="hs-identifier hs-var">szQ</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034251"><span class="hs-identifier hs-var">szR</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034250"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034250"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679034249"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034249"><span class="hs-identifier hs-var">mwr</span></a></span></span><span> </span><span id="local-6989586621679034248"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034248"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-636"></span><span>                     </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; MutableWordArray# RealWorld
 -&gt; BigNat#
 -&gt; BigNat#
 -&gt; State# RealWorld
 -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_quotrem"><span class="hs-identifier hs-var">bignat_quotrem</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034250"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034249"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034259"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034258"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034248"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-637"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-638"></span><span>   </span><span id="local-6989586621679034257"><span class="annot"><span class="annottext">cmp :: Ordering
</span><a href="#local-6989586621679034257"><span class="hs-identifier hs-var hs-var">cmp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompare"><span class="hs-identifier hs-var">bigNatCompare</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034259"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034258"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-639"></span><span>   </span><span id="local-6989586621679034246"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034246"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034259"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-640"></span><span>   </span><span id="local-6989586621679034256"><span class="annot"><span class="annottext">szB :: Bool#
</span><a href="#local-6989586621679034256"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034258"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-641"></span><span>   </span><span id="local-6989586621679034252"><span class="annot"><span class="annottext">szQ :: Bool#
</span><a href="#local-6989586621679034252"><span class="hs-identifier hs-var hs-var">szQ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034246"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034256"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-642"></span><span>   </span><span id="local-6989586621679034251"><span class="annot"><span class="annottext">szR :: Bool#
</span><a href="#local-6989586621679034251"><span class="hs-identifier hs-var hs-var">szR</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034256"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-643"></span><span>
</span><span id="line-644"></span><span>
</span><span id="line-645"></span><span class="hs-comment">-- | BigNat division returning quotient</span><span>
</span><span id="line-646"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatQuot"><span class="hs-identifier hs-type">bigNatQuot</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-647"></span><span id="bigNatQuot"><span class="annot"><span class="annottext">bigNatQuot :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatQuot"><span class="hs-identifier hs-var hs-var">bigNatQuot</span></a></span></span><span> </span><span id="local-6989586621679034244"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034244"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034243"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034243"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-648"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034243"><span class="hs-identifier hs-var">b</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#raiseDivZero_BigNat"><span class="hs-identifier hs-var">raiseDivZero_BigNat</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-649"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034244"><span class="hs-identifier hs-var">a</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-650"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034243"><span class="hs-identifier hs-var">b</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034244"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-651"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679034242"><span class="hs-identifier hs-var">cmp</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-652"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679034242"><span class="hs-identifier hs-var">cmp</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatOne%23"><span class="hs-identifier hs-var">bigNatOne#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-653"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034241"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatQuotWord%23"><span class="hs-identifier hs-var">bigNatQuotWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034244"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034243"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-654"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034240"><span class="hs-identifier hs-var">szQ</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034239"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034239"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679034238"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034238"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-655"></span><span>                                 </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_quot"><span class="hs-identifier hs-var">bignat_quot</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034239"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034244"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034243"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034238"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-656"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-657"></span><span>   </span><span id="local-6989586621679034242"><span class="annot"><span class="annottext">cmp :: Ordering
</span><a href="#local-6989586621679034242"><span class="hs-identifier hs-var hs-var">cmp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompare"><span class="hs-identifier hs-var">bigNatCompare</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034244"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034243"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-658"></span><span>   </span><span id="local-6989586621679034236"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034236"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034244"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-659"></span><span>   </span><span id="local-6989586621679034241"><span class="annot"><span class="annottext">szB :: Bool#
</span><a href="#local-6989586621679034241"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034243"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-660"></span><span>   </span><span id="local-6989586621679034240"><span class="annot"><span class="annottext">szQ :: Bool#
</span><a href="#local-6989586621679034240"><span class="hs-identifier hs-var hs-var">szQ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034236"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034241"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-661"></span><span>
</span><span id="line-662"></span><span class="hs-comment">-- | BigNat division returning remainder</span><span>
</span><span id="line-663"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatRem"><span class="hs-identifier hs-type">bigNatRem</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-664"></span><span id="bigNatRem"><span class="annot"><span class="annottext">bigNatRem :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatRem"><span class="hs-identifier hs-var hs-var">bigNatRem</span></a></span></span><span> </span><span id="local-6989586621679034234"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034234"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034233"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034233"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-665"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034233"><span class="hs-identifier hs-var">b</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#raiseDivZero_BigNat"><span class="hs-identifier hs-var">raiseDivZero_BigNat</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-666"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034234"><span class="hs-identifier hs-var">a</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-667"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034233"><span class="hs-identifier hs-var">b</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-668"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679034232"><span class="hs-identifier hs-var">cmp</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034234"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-669"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679034232"><span class="hs-identifier hs-var">cmp</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-670"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034231"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatRemWord%23"><span class="hs-identifier hs-var">bigNatRemWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034234"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034233"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-671"></span><span>                                 </span><span id="local-6989586621679034230"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034230"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034230"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-672"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034229"><span class="hs-identifier hs-var">szR</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034228"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034228"><span class="hs-identifier hs-var">mwr</span></a></span></span><span> </span><span id="local-6989586621679034227"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034227"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-673"></span><span>                                 </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_rem"><span class="hs-identifier hs-var">bignat_rem</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034228"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034234"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034233"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034227"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-674"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-675"></span><span>   </span><span id="local-6989586621679034232"><span class="annot"><span class="annottext">cmp :: Ordering
</span><a href="#local-6989586621679034232"><span class="hs-identifier hs-var hs-var">cmp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompare"><span class="hs-identifier hs-var">bigNatCompare</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034234"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034233"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-676"></span><span>   </span><span id="local-6989586621679034231"><span class="annot"><span class="annottext">szB :: Bool#
</span><a href="#local-6989586621679034231"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034233"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-677"></span><span>   </span><span id="local-6989586621679034229"><span class="annot"><span class="annottext">szR :: Bool#
</span><a href="#local-6989586621679034229"><span class="hs-identifier hs-var hs-var">szR</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034231"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-678"></span><span>
</span><span id="line-679"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-680"></span><span class="hs-comment">-- GCD / LCM</span><span>
</span><span id="line-681"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-682"></span><span>
</span><span id="line-683"></span><span class="hs-comment">-- Word#/Int# GCDs shouldn't be here in BigNat. However GMP provides a very fast</span><span>
</span><span id="line-684"></span><span class="hs-comment">-- implementation so we keep this here at least until we get a native Haskell</span><span>
</span><span id="line-685"></span><span class="hs-comment">-- implementation as fast as GMP's one. Note that these functions are used in</span><span>
</span><span id="line-686"></span><span class="hs-comment">-- `base` (e.g. in GHC.Real)</span><span>
</span><span id="line-687"></span><span>
</span><span id="line-688"></span><span class="hs-comment">-- | Greatest common divisor between two Word#</span><span>
</span><span id="line-689"></span><span class="annot"><a href="GHC.Num.BigNat.html#gcdWord%23"><span class="hs-identifier hs-type">gcdWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-690"></span><span id="gcdWord%23"><span class="annot"><span class="annottext">gcdWord# :: Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#gcdWord%23"><span class="hs-identifier hs-var hs-var">gcdWord#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_gcd_word_word"><span class="hs-identifier hs-var">bignat_gcd_word_word</span></a></span><span>
</span><span id="line-691"></span><span>
</span><span id="line-692"></span><span class="hs-comment">-- | Greatest common divisor between two Word</span><span>
</span><span id="line-693"></span><span class="annot"><a href="GHC.Num.BigNat.html#gcdWord"><span class="hs-identifier hs-type">gcdWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-694"></span><span id="gcdWord"><span class="annot"><span class="annottext">gcdWord :: Word -&gt; Word -&gt; Word
</span><a href="GHC.Num.BigNat.html#gcdWord"><span class="hs-identifier hs-var hs-var">gcdWord</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034222"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034222"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034221"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034221"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#gcdWord%23"><span class="hs-identifier hs-var">gcdWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034222"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034221"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-695"></span><span>
</span><span id="line-696"></span><span class="hs-comment">-- | Greatest common divisor between two Int#</span><span>
</span><span id="line-697"></span><span class="hs-comment">--</span><span>
</span><span id="line-698"></span><span class="hs-comment">-- __Warning__: result may become negative if (at least) one argument</span><span>
</span><span id="line-699"></span><span class="hs-comment">-- is 'minBound'</span><span>
</span><span id="line-700"></span><span class="annot"><a href="GHC.Num.BigNat.html#gcdInt%23"><span class="hs-identifier hs-type">gcdInt#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-701"></span><span id="gcdInt%23"><span class="annot"><span class="annottext">gcdInt# :: Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#gcdInt%23"><span class="hs-identifier hs-var hs-var">gcdInt#</span></a></span></span><span> </span><span id="local-6989586621679034219"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034219"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679034218"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034218"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#gcdWord%23"><span class="hs-identifier hs-var">gcdWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromAbsInt%23"><span class="hs-identifier hs-var">wordFromAbsInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034219"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromAbsInt%23"><span class="hs-identifier hs-var">wordFromAbsInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034218"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-702"></span><span>
</span><span id="line-703"></span><span class="hs-comment">-- | Greatest common divisor between two Int</span><span>
</span><span id="line-704"></span><span class="hs-comment">--</span><span>
</span><span id="line-705"></span><span class="hs-comment">-- __Warning__: result may become negative if (at least) one argument</span><span>
</span><span id="line-706"></span><span class="hs-comment">-- is 'minBound'</span><span>
</span><span id="line-707"></span><span class="annot"><a href="GHC.Num.BigNat.html#gcdInt"><span class="hs-identifier hs-type">gcdInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-708"></span><span id="gcdInt"><span class="annot"><span class="annottext">gcdInt :: Int -&gt; Int -&gt; Int
</span><a href="GHC.Num.BigNat.html#gcdInt"><span class="hs-identifier hs-var hs-var">gcdInt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679034216"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034216"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679034215"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034215"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#gcdInt%23"><span class="hs-identifier hs-var">gcdInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034216"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034215"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-709"></span><span>
</span><span id="line-710"></span><span class="hs-comment">-- | Greatest common divisor</span><span>
</span><span id="line-711"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatGcd"><span class="hs-identifier hs-type">bigNatGcd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-712"></span><span id="bigNatGcd"><span class="annot"><span class="annottext">bigNatGcd :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatGcd"><span class="hs-identifier hs-var hs-var">bigNatGcd</span></a></span></span><span> </span><span id="local-6989586621679034213"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034212"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-713"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-714"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-715"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-716"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-717"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-718"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-719"></span><span>      </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#gcdWord%23"><span class="hs-identifier hs-var">gcdWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-720"></span><span>                                                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-721"></span><span>      </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatGcdWord%23"><span class="hs-identifier hs-var">bigNatGcdWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-722"></span><span>      </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatGcdWord%23"><span class="hs-identifier hs-var">bigNatGcdWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-723"></span><span>      </span><span class="annot"><span class="annottext">(# Bool#, Bool# #)
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-724"></span><span>         </span><span class="hs-keyword">let</span><span>
</span><span id="line-725"></span><span>            </span><span id="local-6989586621679034210"><span class="annot"><span class="annottext">go :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="#local-6989586621679034210"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679034209"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034209"><span class="hs-identifier hs-var">wx</span></a></span></span><span> </span><span id="local-6989586621679034208"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034208"><span class="hs-identifier hs-var">wy</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-comment">-- wx &gt; wy</span><span>
</span><span id="line-726"></span><span>               </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034208"><span class="hs-identifier hs-var">wy</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034207"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034207"><span class="hs-identifier hs-var">mwr</span></a></span></span><span> </span><span id="local-6989586621679034206"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034206"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-727"></span><span>                  </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_gcd"><span class="hs-identifier hs-var">bignat_gcd</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034207"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034209"><span class="hs-identifier hs-var">wx</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034208"><span class="hs-identifier hs-var">wy</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034206"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-728"></span><span>         </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompare"><span class="hs-identifier hs-var">bigNatCompare</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-729"></span><span>               </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-730"></span><span>               </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="#local-6989586621679034210"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-731"></span><span>               </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="#local-6989586621679034210"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034213"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034212"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-732"></span><span>
</span><span id="line-733"></span><span class="hs-comment">-- | Greatest common divisor</span><span>
</span><span id="line-734"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatGcdWord%23"><span class="hs-identifier hs-type">bigNatGcdWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-735"></span><span id="bigNatGcdWord%23"><span class="annot"><span class="annottext">bigNatGcdWord# :: BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatGcdWord%23"><span class="hs-identifier hs-var hs-var">bigNatGcdWord#</span></a></span></span><span> </span><span id="local-6989586621679034204"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034204"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034203"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034203"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-736"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034204"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-737"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034203"><span class="hs-identifier hs-var">b</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-738"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034204"><span class="hs-identifier hs-var">a</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span>
</span><span id="line-739"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034203"><span class="hs-identifier hs-var">b</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span>
</span><span id="line-740"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompareWord%23"><span class="hs-identifier hs-var">bigNatCompareWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034204"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034203"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-741"></span><span>      </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034203"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-742"></span><span>      </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_gcd_word"><span class="hs-identifier hs-var">bignat_gcd_word</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034204"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034203"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-743"></span><span>
</span><span id="line-744"></span><span class="hs-comment">-- | Least common multiple</span><span>
</span><span id="line-745"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLcm"><span class="hs-identifier hs-type">bigNatLcm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-746"></span><span id="bigNatLcm"><span class="annot"><span class="annottext">bigNatLcm :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatLcm"><span class="hs-identifier hs-var hs-var">bigNatLcm</span></a></span></span><span> </span><span id="local-6989586621679034200"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034200"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034199"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034199"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-747"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034200"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-748"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034199"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-749"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span>  </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034200"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034199"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-750"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span>  </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034199"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034200"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-751"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-752"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034200"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034199"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-753"></span><span>      </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatLcmWordWord%23"><span class="hs-identifier hs-var">bigNatLcmWordWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034200"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034199"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-754"></span><span>      </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatLcmWord%23"><span class="hs-identifier hs-var">bigNatLcmWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034199"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034200"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-755"></span><span>      </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatLcmWord%23"><span class="hs-identifier hs-var">bigNatLcmWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034200"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034199"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-756"></span><span>      </span><span class="annot"><span class="annottext">(# Bool#, Bool# #)
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034200"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatQuot"><span class="hs-operator hs-var">`bigNatQuot`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034200"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatGcd"><span class="hs-operator hs-var">`bigNatGcd`</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034199"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatMul"><span class="hs-operator hs-var">`bigNatMul`</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034199"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-757"></span><span>                       </span><span class="hs-comment">-- TODO: use extended GCD to get a's factor directly</span><span>
</span><span id="line-758"></span><span>
</span><span id="line-759"></span><span class="hs-comment">-- | Least common multiple with a Word#</span><span>
</span><span id="line-760"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLcmWord%23"><span class="hs-identifier hs-type">bigNatLcmWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-761"></span><span id="bigNatLcmWord%23"><span class="annot"><span class="annottext">bigNatLcmWord# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatLcmWord%23"><span class="hs-identifier hs-var hs-var">bigNatLcmWord#</span></a></span></span><span> </span><span id="local-6989586621679034196"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034196"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034195"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034195"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-762"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034196"><span class="hs-identifier hs-var">a</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-763"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034195"><span class="hs-identifier hs-var">b</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-764"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span>  </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034196"><span class="hs-identifier hs-var">a</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034195"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-765"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034195"><span class="hs-identifier hs-var">b</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034196"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-766"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034196"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatLcmWordWord%23"><span class="hs-identifier hs-var">bigNatLcmWordWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034196"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034195"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-767"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-768"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034196"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatQuotWord%23"><span class="hs-operator hs-var">`bigNatQuotWord#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034196"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatGcdWord%23"><span class="hs-operator hs-var">`bigNatGcdWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034195"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatMulWord%23"><span class="hs-operator hs-var">`bigNatMulWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034195"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-769"></span><span>      </span><span class="hs-comment">-- TODO: use extended GCD to get a's factor directly</span><span>
</span><span id="line-770"></span><span>
</span><span id="line-771"></span><span class="hs-comment">-- | Least common multiple between two Word#</span><span>
</span><span id="line-772"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLcmWordWord%23"><span class="hs-identifier hs-type">bigNatLcmWordWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-773"></span><span id="bigNatLcmWordWord%23"><span class="annot"><span class="annottext">bigNatLcmWordWord# :: Word# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatLcmWordWord%23"><span class="hs-identifier hs-var hs-var">bigNatLcmWordWord#</span></a></span></span><span> </span><span id="local-6989586621679034194"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034194"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034193"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034193"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-774"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034194"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-775"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034193"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-776"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034194"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034193"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-777"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034193"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034194"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-778"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034194"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#quotWord%23"><span class="hs-operator hs-var">`quotWord#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034194"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#gcdWord%23"><span class="hs-operator hs-var">`gcdWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034193"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#timesWord2%23"><span class="hs-operator hs-var">`timesWord2#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034193"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-779"></span><span>                     </span><span class="hs-comment">-- TODO: use extended GCD to get a's factor directly</span><span>
</span><span id="line-780"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034192"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034192"><span class="hs-identifier hs-var">h</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679034191"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034191"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord2%23"><span class="hs-identifier hs-var">bigNatFromWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034192"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034191"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-781"></span><span>
</span><span id="line-782"></span><span>
</span><span id="line-783"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-784"></span><span class="hs-comment">-- Bitwise operations</span><span>
</span><span id="line-785"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-786"></span><span>
</span><span id="line-787"></span><span class="hs-comment">-- | Bitwise OR</span><span>
</span><span id="line-788"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatOr"><span class="hs-identifier hs-type">bigNatOr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-789"></span><span id="bigNatOr"><span class="annot"><span class="annottext">bigNatOr :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatOr"><span class="hs-identifier hs-var hs-var">bigNatOr</span></a></span></span><span> </span><span id="local-6989586621679034189"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034189"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034188"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034188"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-790"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034189"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034188"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-791"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034188"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034189"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-792"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034187"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034186"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034186"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034185"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034185"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-793"></span><span>                        </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_or"><span class="hs-identifier hs-var">bignat_or</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034186"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034189"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034188"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034185"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-794"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-795"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034183"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034183"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034189"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-796"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034182"><span class="annot"><span class="annottext">szB :: Bool#
</span><a href="#local-6989586621679034182"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034188"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-797"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034187"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034187"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#maxI%23"><span class="hs-identifier hs-var">maxI#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034183"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034182"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-798"></span><span>
</span><span id="line-799"></span><span class="hs-comment">-- | Bitwise OR with Word#</span><span>
</span><span id="line-800"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatOrWord%23"><span class="hs-identifier hs-type">bigNatOrWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-801"></span><span id="bigNatOrWord%23"><span class="annot"><span class="annottext">bigNatOrWord# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatOrWord%23"><span class="hs-identifier hs-var hs-var">bigNatOrWord#</span></a></span></span><span> </span><span id="local-6989586621679034180"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034180"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034179"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034179"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-802"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034180"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034179"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-803"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034179"><span class="hs-identifier hs-var">b</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034180"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-804"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span>
</span><span id="line-805"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679034178"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034178"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034180"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-806"></span><span>      </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034178"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034177"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034177"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034176"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034176"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-807"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool#
-&gt; BigNat#
-&gt; Bool#
-&gt; Bool#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Bool# -&gt; BigNat# -&gt; Bool# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034177"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034180"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034178"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034176"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-808"></span><span>               </span><span id="local-6989586621679034175"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034175"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034177"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034180"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034179"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034175"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-809"></span><span>
</span><span id="line-810"></span><span class="hs-comment">-- | Bitwise AND</span><span>
</span><span id="line-811"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatAnd"><span class="hs-identifier hs-type">bigNatAnd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-812"></span><span id="bigNatAnd"><span class="annot"><span class="annottext">bigNatAnd :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatAnd"><span class="hs-identifier hs-var hs-var">bigNatAnd</span></a></span></span><span> </span><span id="local-6989586621679034173"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034173"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034172"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034172"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-813"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034173"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034173"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-814"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034172"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034172"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-815"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034171"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034170"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034170"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034169"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034169"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-816"></span><span>                        </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_and"><span class="hs-identifier hs-var">bignat_and</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034170"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034173"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034172"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034169"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-817"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-818"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034167"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034167"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034173"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-819"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034166"><span class="annot"><span class="annottext">szB :: Bool#
</span><a href="#local-6989586621679034166"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034172"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-820"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034171"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034171"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#minI%23"><span class="hs-identifier hs-var">minI#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034167"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034166"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-821"></span><span>
</span><span id="line-822"></span><span class="hs-comment">-- | Bitwise ANDNOT</span><span>
</span><span id="line-823"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatAndNot"><span class="hs-identifier hs-type">bigNatAndNot</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-824"></span><span id="bigNatAndNot"><span class="annot"><span class="annottext">bigNatAndNot :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatAndNot"><span class="hs-identifier hs-var hs-var">bigNatAndNot</span></a></span></span><span> </span><span id="local-6989586621679034163"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034163"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034162"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034162"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-825"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034163"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034163"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-826"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034162"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034163"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-827"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034161"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034160"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034160"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034159"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034159"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-828"></span><span>                        </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_and_not"><span class="hs-identifier hs-var">bignat_and_not</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034160"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034163"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034162"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034159"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-829"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-830"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034161"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034161"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034163"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-831"></span><span>
</span><span id="line-832"></span><span class="hs-comment">-- | Bitwise AND with Word#</span><span>
</span><span id="line-833"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatAndWord%23"><span class="hs-identifier hs-type">bigNatAndWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-834"></span><span id="bigNatAndWord%23"><span class="annot"><span class="annottext">bigNatAndWord# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatAndWord%23"><span class="hs-identifier hs-var hs-var">bigNatAndWord#</span></a></span></span><span> </span><span id="local-6989586621679034156"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034156"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034155"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034155"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-835"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034156"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034156"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-836"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034156"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034155"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-837"></span><span>
</span><span id="line-838"></span><span class="hs-comment">-- | Bitwise ANDNOT with Word#</span><span>
</span><span id="line-839"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatAndNotWord%23"><span class="hs-identifier hs-type">bigNatAndNotWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-840"></span><span id="bigNatAndNotWord%23"><span class="annot"><span class="annottext">bigNatAndNotWord# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatAndNotWord%23"><span class="hs-identifier hs-var hs-var">bigNatAndNotWord#</span></a></span></span><span> </span><span id="local-6989586621679034153"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034153"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034152"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034152"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-841"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034153"><span class="hs-identifier hs-var">a</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034153"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-842"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679034151"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034151"><span class="hs-identifier hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034153"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-843"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034151"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034150"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034150"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034149"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034149"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-844"></span><span>      </span><span class="hs-comment">-- duplicate higher limbs</span><span>
</span><span id="line-845"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool#
-&gt; BigNat#
-&gt; Bool#
-&gt; Bool#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Bool# -&gt; BigNat# -&gt; Bool# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034150"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034153"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034151"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034149"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-846"></span><span>         </span><span id="local-6989586621679034148"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034148"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWordArray%23"><span class="hs-identifier hs-var">writeWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034150"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-847"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034153"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#not%23"><span class="hs-identifier hs-var">not#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034152"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034148"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-848"></span><span>
</span><span id="line-849"></span><span class="hs-comment">-- | Bitwise AND with Int#</span><span>
</span><span id="line-850"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatAndInt%23"><span class="hs-identifier hs-type">bigNatAndInt#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-851"></span><span id="bigNatAndInt%23"><span class="annot"><span class="annottext">bigNatAndInt# :: BigNat# -&gt; Bool# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatAndInt%23"><span class="hs-identifier hs-var hs-var">bigNatAndInt#</span></a></span></span><span> </span><span id="local-6989586621679034146"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034146"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034145"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034145"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-852"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034146"><span class="hs-identifier hs-var">a</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034146"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-853"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034145"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatAndWord%23"><span class="hs-identifier hs-var">bigNatAndWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034146"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034145"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-854"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679034144"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034144"><span class="hs-identifier hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034146"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-855"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034144"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034143"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034143"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034142"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034142"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-856"></span><span>      </span><span class="hs-comment">-- duplicate higher limbs (because of sign-extension of b)</span><span>
</span><span id="line-857"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool#
-&gt; BigNat#
-&gt; Bool#
-&gt; Bool#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Bool# -&gt; BigNat# -&gt; Bool# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034143"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034146"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034144"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034142"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-858"></span><span>         </span><span id="local-6989586621679034141"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034141"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWordArray%23"><span class="hs-identifier hs-var">writeWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034143"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-859"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034146"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034145"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034141"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-860"></span><span>
</span><span id="line-861"></span><span>
</span><span id="line-862"></span><span class="hs-comment">-- | Bitwise XOR</span><span>
</span><span id="line-863"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatXor"><span class="hs-identifier hs-type">bigNatXor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-864"></span><span id="bigNatXor"><span class="annot"><span class="annottext">bigNatXor :: BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatXor"><span class="hs-identifier hs-var hs-var">bigNatXor</span></a></span></span><span> </span><span id="local-6989586621679034139"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034139"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034138"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034138"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-865"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034139"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034138"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-866"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034138"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034139"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-867"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034137"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034136"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034136"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034135"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034135"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-868"></span><span>                        </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; BigNat# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_xor"><span class="hs-identifier hs-var">bignat_xor</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034136"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034139"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034138"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034135"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-869"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-870"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034133"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034133"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034139"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-871"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034132"><span class="annot"><span class="annottext">szB :: Bool#
</span><a href="#local-6989586621679034132"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034138"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-872"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034137"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034137"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#maxI%23"><span class="hs-identifier hs-var">maxI#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034133"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034132"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-873"></span><span>
</span><span id="line-874"></span><span class="hs-comment">-- | Bitwise XOR with Word#</span><span>
</span><span id="line-875"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatXorWord%23"><span class="hs-identifier hs-type">bigNatXorWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-876"></span><span id="bigNatXorWord%23"><span class="annot"><span class="annottext">bigNatXorWord# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatXorWord%23"><span class="hs-identifier hs-var hs-var">bigNatXorWord#</span></a></span></span><span> </span><span id="local-6989586621679034130"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034130"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034129"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034129"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-877"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034130"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034129"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-878"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034129"><span class="hs-identifier hs-var">b</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034130"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-879"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span>
</span><span id="line-880"></span><span>      </span><span class="hs-keyword">let</span><span>
</span><span id="line-881"></span><span>         </span><span id="local-6989586621679034128"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034128"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034130"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-882"></span><span>      </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034128"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034127"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034127"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034126"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034126"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-883"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool#
-&gt; BigNat#
-&gt; Bool#
-&gt; Bool#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Bool# -&gt; BigNat# -&gt; Bool# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034127"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034130"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034128"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034126"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-884"></span><span>               </span><span id="local-6989586621679034125"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034125"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034127"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034130"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#xor%23"><span class="hs-operator hs-var">`xor#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034129"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034125"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-885"></span><span>
</span><span id="line-886"></span><span class="hs-comment">-- | PopCount for BigNat</span><span>
</span><span id="line-887"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatPopCount"><span class="hs-identifier hs-type">bigNatPopCount</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-888"></span><span id="bigNatPopCount"><span class="annot"><span class="annottext">bigNatPopCount :: BigNat# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatPopCount"><span class="hs-identifier hs-var hs-var">bigNatPopCount</span></a></span></span><span> </span><span id="local-6989586621679034123"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034123"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatPopCount%23"><span class="hs-identifier hs-var">bigNatPopCount#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034123"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-889"></span><span>
</span><span id="line-890"></span><span class="hs-comment">-- | PopCount for BigNat</span><span>
</span><span id="line-891"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatPopCount%23"><span class="hs-identifier hs-type">bigNatPopCount#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-892"></span><span id="bigNatPopCount%23"><span class="annot"><span class="annottext">bigNatPopCount# :: BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatPopCount%23"><span class="hs-identifier hs-var hs-var">bigNatPopCount#</span></a></span></span><span> </span><span id="local-6989586621679034121"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034121"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-893"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034121"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-894"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BigNat# -&gt; Word#) -&gt; BigNat# -&gt; Word#
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_popcount"><span class="hs-identifier hs-var">bignat_popcount</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034121"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-895"></span><span>
</span><span id="line-896"></span><span class="hs-comment">-- | Bit shift right</span><span>
</span><span id="line-897"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatShiftR%23"><span class="hs-identifier hs-type">bigNatShiftR#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-898"></span><span id="bigNatShiftR%23"><span class="annot"><span class="annottext">bigNatShiftR# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatShiftR%23"><span class="hs-identifier hs-var hs-var">bigNatShiftR#</span></a></span></span><span> </span><span id="local-6989586621679034118"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034118"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034117"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034117"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-899"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034117"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-900"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034118"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-901"></span><span>
</span><span id="line-902"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034118"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-903"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034118"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-904"></span><span>
</span><span id="line-905"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679034116"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034116"><span class="hs-identifier hs-var">nw</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034117"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span class="hs-special">)</span><span>
</span><span id="line-906"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034116"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034118"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-907"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-908"></span><span>
</span><span id="line-909"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-910"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-911"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034115"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034115"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034118"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-912"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034114"><span class="annot"><span class="annottext">nw :: Bool#
</span><a href="#local-6989586621679034114"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034117"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span class="hs-special">)</span><span>
</span><span id="line-913"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034113"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034113"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034115"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034114"><span class="hs-identifier hs-var">nw</span></a></span><span>
</span><span id="line-914"></span><span>     </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034113"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034112"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034112"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034111"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034111"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-915"></span><span>         </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; Word#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_shiftr"><span class="hs-identifier hs-var">bignat_shiftr</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034112"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034118"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034117"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034111"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-916"></span><span>
</span><span id="line-917"></span><span class="hs-comment">-- | Bit shift right (two's complement)</span><span>
</span><span id="line-918"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatShiftRNeg%23"><span class="hs-identifier hs-type">bigNatShiftRNeg#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-919"></span><span id="bigNatShiftRNeg%23"><span class="annot"><span class="annottext">bigNatShiftRNeg# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatShiftRNeg%23"><span class="hs-identifier hs-var hs-var">bigNatShiftRNeg#</span></a></span></span><span> </span><span id="local-6989586621679034108"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034108"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034107"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034107"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-920"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034107"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-921"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034108"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-922"></span><span>
</span><span id="line-923"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034108"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-924"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034108"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-925"></span><span>
</span><span id="line-926"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679034106"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034106"><span class="hs-identifier hs-var">nw</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034107"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span class="hs-special">)</span><span>
</span><span id="line-927"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034106"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034108"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-928"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-929"></span><span>
</span><span id="line-930"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-931"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-932"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034105"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034105"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034108"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-933"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034104"><span class="annot"><span class="annottext">nw :: Bool#
</span><a href="#local-6989586621679034104"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034107"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftRL%23"><span class="hs-operator hs-var">`uncheckedIShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span>
</span><span id="line-934"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034103"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034103"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034105"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034104"><span class="hs-identifier hs-var">nw</span></a></span><span>
</span><span id="line-935"></span><span>     </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034103"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034102"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034102"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034101"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034101"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-936"></span><span>         </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; Word#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_shiftr_neg"><span class="hs-identifier hs-var">bignat_shiftr_neg</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034102"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034108"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034107"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034101"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-937"></span><span>
</span><span id="line-938"></span><span>
</span><span id="line-939"></span><span class="hs-comment">-- | Bit shift right</span><span>
</span><span id="line-940"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatShiftR"><span class="hs-identifier hs-type">bigNatShiftR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-941"></span><span id="bigNatShiftR"><span class="annot"><span class="annottext">bigNatShiftR :: BigNat# -&gt; Word -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatShiftR"><span class="hs-identifier hs-var hs-var">bigNatShiftR</span></a></span></span><span> </span><span id="local-6989586621679034098"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034098"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034097"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034097"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatShiftR%23"><span class="hs-identifier hs-var">bigNatShiftR#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034098"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034097"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-942"></span><span>
</span><span id="line-943"></span><span class="hs-comment">-- | Bit shift left</span><span>
</span><span id="line-944"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatShiftL"><span class="hs-identifier hs-type">bigNatShiftL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-945"></span><span id="bigNatShiftL"><span class="annot"><span class="annottext">bigNatShiftL :: BigNat# -&gt; Word -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatShiftL"><span class="hs-identifier hs-var hs-var">bigNatShiftL</span></a></span></span><span> </span><span id="local-6989586621679034095"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034095"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034094"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034094"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatShiftL%23"><span class="hs-identifier hs-var">bigNatShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034095"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034094"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-946"></span><span>
</span><span id="line-947"></span><span class="hs-comment">-- | Bit shift left</span><span>
</span><span id="line-948"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatShiftL%23"><span class="hs-identifier hs-type">bigNatShiftL#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-949"></span><span id="bigNatShiftL%23"><span class="annot"><span class="annottext">bigNatShiftL# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatShiftL%23"><span class="hs-identifier hs-var hs-var">bigNatShiftL#</span></a></span></span><span> </span><span id="local-6989586621679034092"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034092"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034091"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034091"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-950"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034091"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-951"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034092"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-952"></span><span>
</span><span id="line-953"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034092"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-954"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034092"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-955"></span><span>
</span><span id="line-956"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-957"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-958"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034090"><span class="annot"><span class="annottext">szA :: Bool#
</span><a href="#local-6989586621679034090"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034092"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-959"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034089"><span class="annot"><span class="annottext">nw :: Bool#
</span><a href="#local-6989586621679034089"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034091"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span class="hs-special">)</span><span>
</span><span id="line-960"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034088"><span class="annot"><span class="annottext">nb :: Bool#
</span><a href="#local-6989586621679034088"><span class="hs-identifier hs-var hs-var">nb</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034091"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_MASK##</span><span class="hs-special">)</span><span>
</span><span id="line-961"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034087"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034087"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034090"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034089"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034088"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2F%3D%23"><span class="hs-operator hs-var">/=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-962"></span><span>
</span><span id="line-963"></span><span>     </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034087"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034086"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034086"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034085"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034085"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-964"></span><span>         </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; Word#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_shiftl"><span class="hs-identifier hs-var">bignat_shiftl</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034086"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034092"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034091"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034085"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-965"></span><span>
</span><span id="line-966"></span><span>
</span><span id="line-967"></span><span class="hs-comment">-- | BigNat bit test</span><span>
</span><span id="line-968"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatTestBit%23"><span class="hs-identifier hs-type">bigNatTestBit#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-969"></span><span id="bigNatTestBit%23"><span class="annot"><span class="annottext">bigNatTestBit# :: BigNat# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatTestBit%23"><span class="hs-identifier hs-var hs-var">bigNatTestBit#</span></a></span></span><span> </span><span id="local-6989586621679034082"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034082"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034081"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034081"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-970"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-971"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034080"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034080"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034082"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-972"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034079"><span class="annot"><span class="annottext">nw :: Bool#
</span><a href="#local-6989586621679034079"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034081"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span class="hs-special">)</span><span>
</span><span id="line-973"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034078"><span class="annot"><span class="annottext">nb :: Word#
</span><a href="#local-6989586621679034078"><span class="hs-identifier hs-var hs-var">nb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034081"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_MASK##</span><span>
</span><span id="line-974"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span>
</span><span id="line-975"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034079"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034080"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-976"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#testBitW%23"><span class="hs-identifier hs-var">testBitW#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034082"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034079"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034078"><span class="hs-identifier hs-var">nb</span></a></span><span>
</span><span id="line-977"></span><span>
</span><span id="line-978"></span><span class="hs-comment">-- | BigNat bit test</span><span>
</span><span id="line-979"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatTestBit"><span class="hs-identifier hs-type">bigNatTestBit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-980"></span><span id="bigNatTestBit"><span class="annot"><span class="annottext">bigNatTestBit :: BigNat# -&gt; Word -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatTestBit"><span class="hs-identifier hs-var hs-var">bigNatTestBit</span></a></span></span><span> </span><span id="local-6989586621679034075"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034075"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034074"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034074"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatTestBit%23"><span class="hs-identifier hs-var">bigNatTestBit#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034075"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034074"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-981"></span><span>
</span><span id="line-982"></span><span>
</span><span id="line-983"></span><span class="hs-comment">-- | Return a BigNat whose bit `i` is the only one set.</span><span>
</span><span id="line-984"></span><span class="hs-comment">--</span><span>
</span><span id="line-985"></span><span class="hs-comment">-- Specialized version of `bigNatShiftL (bigNatFromWord# 1##)`</span><span>
</span><span id="line-986"></span><span class="hs-comment">--</span><span>
</span><span id="line-987"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatBit%23"><span class="hs-identifier hs-type">bigNatBit#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-988"></span><span id="bigNatBit%23"><span class="annot"><span class="annottext">bigNatBit# :: Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatBit%23"><span class="hs-identifier hs-var hs-var">bigNatBit#</span></a></span></span><span> </span><span id="local-6989586621679034072"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034072"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-989"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034072"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatOne%23"><span class="hs-identifier hs-var">bigNatOne#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-990"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-991"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-992"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034071"><span class="annot"><span class="annottext">nw :: Bool#
</span><a href="#local-6989586621679034071"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034072"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span class="hs-special">)</span><span>
</span><span id="line-993"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034070"><span class="annot"><span class="annottext">nb :: Bool#
</span><a href="#local-6989586621679034070"><span class="hs-identifier hs-var hs-var">nb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034072"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_MASK##</span><span class="hs-special">)</span><span>
</span><span id="line-994"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034069"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034069"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034071"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-995"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034068"><span class="annot"><span class="annottext">v :: Word#
</span><a href="#local-6989586621679034068"><span class="hs-identifier hs-var hs-var">v</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034070"><span class="hs-identifier hs-var">nb</span></a></span><span>
</span><span id="line-996"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034069"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034067"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034067"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034066"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034066"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-997"></span><span>         </span><span class="hs-comment">-- clear the array</span><span>
</span><span id="line-998"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Word# -&gt; Word# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s
-&gt; Word# -&gt; Word# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaFill%23"><span class="hs-identifier hs-var">mwaFill#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034067"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034069"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034066"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-999"></span><span>            </span><span class="hs-comment">-- set the bit in the most-significant word</span><span>
</span><span id="line-1000"></span><span>            </span><span id="local-6989586621679034064"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034064"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034067"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034069"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034068"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034064"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-1001"></span><span>
</span><span id="line-1002"></span><span class="hs-comment">-- | Return a BigNat whose bit `i` is the only one set.</span><span>
</span><span id="line-1003"></span><span class="hs-comment">--</span><span>
</span><span id="line-1004"></span><span class="hs-comment">-- Specialized version of `bigNatShiftL (bigNatFromWord# 1##)`</span><span>
</span><span id="line-1005"></span><span class="hs-comment">--</span><span>
</span><span id="line-1006"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatBit"><span class="hs-identifier hs-type">bigNatBit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-1007"></span><span id="bigNatBit"><span class="annot"><span class="annottext">bigNatBit :: Word -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatBit"><span class="hs-identifier hs-var hs-var">bigNatBit</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034062"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034062"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatBit%23"><span class="hs-identifier hs-var">bigNatBit#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034062"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-1008"></span><span>
</span><span id="line-1009"></span><span class="hs-comment">-- | BigNat clear bit</span><span>
</span><span id="line-1010"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatClearBit%23"><span class="hs-identifier hs-type">bigNatClearBit#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-1011"></span><span id="bigNatClearBit%23"><span class="annot"><span class="annottext">bigNatClearBit# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatClearBit%23"><span class="hs-identifier hs-var hs-var">bigNatClearBit#</span></a></span></span><span> </span><span id="local-6989586621679034060"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034060"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034059"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034059"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-1012"></span><span>   </span><span class="hs-comment">-- check the range validity and the current bit value</span><span>
</span><span id="line-1013"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatTestBit%23"><span class="hs-identifier hs-var">bigNatTestBit#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034060"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034059"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034060"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1014"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-1015"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-1016"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034058"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034058"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034060"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1017"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034057"><span class="annot"><span class="annottext">nw :: Bool#
</span><a href="#local-6989586621679034057"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034059"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span class="hs-special">)</span><span>
</span><span id="line-1018"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034056"><span class="annot"><span class="annottext">nb :: Bool#
</span><a href="#local-6989586621679034056"><span class="hs-identifier hs-var hs-var">nb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034059"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_MASK##</span><span class="hs-special">)</span><span>
</span><span id="line-1019"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034055"><span class="annot"><span class="annottext">nv :: Word#
</span><a href="#local-6989586621679034055"><span class="hs-identifier hs-var hs-var">nv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034060"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034057"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#xor%23"><span class="hs-operator hs-var">`xor#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#bitW%23"><span class="hs-identifier hs-var">bitW#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034056"><span class="hs-identifier hs-var">nb</span></a></span><span>
</span><span id="line-1020"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span>
</span><span id="line-1021"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034058"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-1022"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034055"><span class="hs-identifier hs-var">nv</span></a></span><span>
</span><span id="line-1023"></span><span>
</span><span id="line-1024"></span><span>      </span><span class="hs-comment">-- special case, operating on most-significant Word</span><span>
</span><span id="line-1025"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034055"><span class="hs-identifier hs-var">nv</span></a></span><span>
</span><span id="line-1026"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034057"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034058"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1027"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034058"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#waClzAt"><span class="hs-identifier hs-var">waClzAt</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034060"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034058"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">2#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1028"></span><span>            </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-1029"></span><span>            </span><span id="local-6989586621679034052"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034052"><span class="hs-identifier hs-var">nsz</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034052"><span class="hs-identifier hs-var">nsz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034051"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034051"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034050"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034050"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1030"></span><span>                     </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool#
-&gt; BigNat#
-&gt; Bool#
-&gt; Bool#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Bool# -&gt; BigNat# -&gt; Bool# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034051"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034060"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034052"><span class="hs-identifier hs-var">nsz</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034050"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1031"></span><span>
</span><span id="line-1032"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1033"></span><span>         </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034058"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034049"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034049"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034048"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034048"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1034"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool#
-&gt; BigNat#
-&gt; Bool#
-&gt; Bool#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Bool# -&gt; BigNat# -&gt; Bool# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034049"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034060"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034058"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034048"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1035"></span><span>               </span><span id="local-6989586621679034047"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034047"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWordArray%23"><span class="hs-identifier hs-var">writeWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034049"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034057"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034055"><span class="hs-identifier hs-var">nv</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034047"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-1036"></span><span>
</span><span id="line-1037"></span><span class="hs-comment">-- | BigNat set bit</span><span>
</span><span id="line-1038"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatSetBit%23"><span class="hs-identifier hs-type">bigNatSetBit#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-1039"></span><span id="bigNatSetBit%23"><span class="annot"><span class="annottext">bigNatSetBit# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatSetBit%23"><span class="hs-identifier hs-var hs-var">bigNatSetBit#</span></a></span></span><span> </span><span id="local-6989586621679034045"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034045"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679034044"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034044"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-1040"></span><span>   </span><span class="hs-comment">-- check the current bit value</span><span>
</span><span id="line-1041"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatTestBit%23"><span class="hs-identifier hs-var">bigNatTestBit#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034045"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034044"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034045"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1042"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-1043"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-1044"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034043"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679034043"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034045"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1045"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034042"><span class="annot"><span class="annottext">nw :: Bool#
</span><a href="#local-6989586621679034042"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034044"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span class="hs-special">)</span><span>
</span><span id="line-1046"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679034041"><span class="annot"><span class="annottext">nb :: Bool#
</span><a href="#local-6989586621679034041"><span class="hs-identifier hs-var hs-var">nb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034044"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_MASK##</span><span class="hs-special">)</span><span>
</span><span id="line-1047"></span><span>      </span><span id="local-6989586621679034040"><span class="annot"><span class="annottext">d :: Bool#
</span><a href="#local-6989586621679034040"><span class="hs-identifier hs-var hs-var">d</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034042"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034043"><span class="hs-identifier hs-var">sz</span></a></span><span>
</span><span id="line-1048"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span>
</span><span id="line-1049"></span><span>      </span><span class="hs-comment">-- result BigNat will have more limbs</span><span>
</span><span id="line-1050"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034040"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%23"><span class="hs-operator hs-var">&gt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-1051"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034042"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034039"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034039"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034038"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034038"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1052"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool#
-&gt; BigNat#
-&gt; Bool#
-&gt; Bool#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Bool# -&gt; BigNat# -&gt; Bool# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034039"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034045"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034043"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034038"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1053"></span><span>               </span><span id="local-6989586621679034037"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034037"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Word# -&gt; Word# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s
-&gt; Word# -&gt; Word# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaFill%23"><span class="hs-identifier hs-var">mwaFill#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034039"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034043"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034040"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034037"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1054"></span><span>                  </span><span id="local-6989586621679034036"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034036"><span class="hs-identifier hs-var">s''</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWordArray%23"><span class="hs-identifier hs-var">writeWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034039"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034042"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#bitW%23"><span class="hs-identifier hs-var">bitW#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034041"><span class="hs-identifier hs-var">nb</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034036"><span class="hs-identifier hs-var">s''</span></a></span><span>
</span><span id="line-1055"></span><span>
</span><span id="line-1056"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679034035"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034035"><span class="hs-identifier hs-var">nv</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034045"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034042"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#bitW%23"><span class="hs-identifier hs-var">bitW#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034041"><span class="hs-identifier hs-var">nb</span></a></span><span>
</span><span id="line-1057"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034043"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679034034"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034034"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679034033"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034033"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1058"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool#
-&gt; BigNat#
-&gt; Bool#
-&gt; Bool#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Bool# -&gt; BigNat# -&gt; Bool# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034034"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034045"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034043"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034033"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1059"></span><span>               </span><span id="local-6989586621679034032"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034032"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWordArray%23"><span class="hs-identifier hs-var">writeWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679034034"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679034042"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034035"><span class="hs-identifier hs-var">nv</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679034032"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-1060"></span><span>
</span><span id="line-1061"></span><span class="hs-comment">-- | Reverse the given bit</span><span>
</span><span id="line-1062"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatComplementBit%23"><span class="hs-identifier hs-type">bigNatComplementBit#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-1063"></span><span id="bigNatComplementBit%23"><span class="annot"><span class="annottext">bigNatComplementBit# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatComplementBit%23"><span class="hs-identifier hs-var hs-var">bigNatComplementBit#</span></a></span></span><span> </span><span id="local-6989586621679034030"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034030"><span class="hs-identifier hs-var">bn</span></a></span></span><span> </span><span id="local-6989586621679034029"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034029"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-1064"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatTestBit%23"><span class="hs-identifier hs-var">bigNatTestBit#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034030"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034029"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatClearBit%23"><span class="hs-identifier hs-var">bigNatClearBit#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034030"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034029"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-1065"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatSetBit%23"><span class="hs-identifier hs-var">bigNatSetBit#</span></a></span><span>   </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034030"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034029"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-1066"></span><span>
</span><span id="line-1067"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1068"></span><span class="hs-comment">-- Log operations</span><span>
</span><span id="line-1069"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1070"></span><span>
</span><span id="line-1071"></span><span class="hs-comment">-- | Base 2 logarithm</span><span>
</span><span id="line-1072"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLog2%23"><span class="hs-identifier hs-type">bigNatLog2#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-1073"></span><span id="bigNatLog2%23"><span class="annot"><span class="annottext">bigNatLog2# :: BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatLog2%23"><span class="hs-identifier hs-var hs-var">bigNatLog2#</span></a></span></span><span> </span><span id="local-6989586621679034027"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034027"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-1074"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034027"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-1075"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span>
</span><span id="line-1076"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679034026"><span class="annot"><span class="annottext">i :: Word#
</span><a href="#local-6989586621679034026"><span class="hs-identifier hs-var hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034027"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#minusWord%23"><span class="hs-operator hs-var">`minusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span>
</span><span id="line-1077"></span><span>      </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordLog2%23"><span class="hs-identifier hs-var">wordLog2#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034027"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034026"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1078"></span><span>         </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034026"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span class="hs-special">)</span><span>
</span><span id="line-1079"></span><span>
</span><span id="line-1080"></span><span class="hs-comment">-- | Base 2 logarithm</span><span>
</span><span id="line-1081"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLog2"><span class="hs-identifier hs-type">bigNatLog2</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-1082"></span><span id="bigNatLog2"><span class="annot"><span class="annottext">bigNatLog2 :: BigNat# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatLog2"><span class="hs-identifier hs-var hs-var">bigNatLog2</span></a></span></span><span> </span><span id="local-6989586621679034023"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034023"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatLog2%23"><span class="hs-identifier hs-var">bigNatLog2#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034023"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1083"></span><span>
</span><span id="line-1084"></span><span class="hs-comment">-- | Logarithm for an arbitrary base</span><span>
</span><span id="line-1085"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLogBase%23"><span class="hs-identifier hs-type">bigNatLogBase#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-1086"></span><span id="bigNatLogBase%23"><span class="annot"><span class="annottext">bigNatLogBase# :: BigNat# -&gt; BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatLogBase%23"><span class="hs-identifier hs-var hs-var">bigNatLogBase#</span></a></span></span><span> </span><span id="local-6989586621679034021"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034021"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679034020"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034020"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-1087"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034021"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034021"><span class="hs-identifier hs-var">base</span></a></span><span>
</span><span id="line-1088"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#unexpectedValue_Word%23"><span class="hs-identifier hs-var">unexpectedValue_Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-1089"></span><span>
</span><span id="line-1090"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034021"><span class="hs-identifier hs-var">base</span></a></span><span>
</span><span id="line-1091"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">2##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034021"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-1092"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatLog2%23"><span class="hs-identifier hs-var">bigNatLog2#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034020"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1093"></span><span>
</span><span id="line-1094"></span><span>   </span><span class="hs-comment">-- TODO: optimize log base power of 2 (256, etc.)</span><span>
</span><span id="line-1095"></span><span>
</span><span id="line-1096"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-1097"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; (# BigNat#, Word# #)
</span><a href="#local-6989586621679034017"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034021"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679034016"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034016"><span class="hs-identifier hs-var">e'</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034016"><span class="hs-identifier hs-var">e'</span></a></span><span>
</span><span id="line-1098"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-1099"></span><span>      </span><span id="local-6989586621679034017"><span class="annot"><span class="annottext">go :: BigNat# -&gt; (# BigNat#, Word# #)
</span><a href="#local-6989586621679034017"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679034015"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034015"><span class="hs-identifier hs-var">pw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034020"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatLt"><span class="hs-operator hs-var">`bigNatLt`</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034015"><span class="hs-identifier hs-var">pw</span></a></span><span>
</span><span id="line-1100"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034020"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1101"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; (# BigNat#, Word# #)
</span><a href="#local-6989586621679034017"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatSqr"><span class="hs-identifier hs-var">bigNatSqr</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034015"><span class="hs-identifier hs-var">pw</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1102"></span><span>          </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679034014"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034014"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679034013"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034013"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034014"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatLt"><span class="hs-operator hs-var">`bigNatLt`</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034015"><span class="hs-identifier hs-var">pw</span></a></span><span>
</span><span id="line-1103"></span><span>            </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034014"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">2##</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#timesWord%23"><span class="hs-operator hs-var">`timesWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034013"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1104"></span><span>            </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034014"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatQuot"><span class="hs-operator hs-var">`bigNatQuot`</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034015"><span class="hs-identifier hs-var">pw</span></a></span><span>
</span><span id="line-1105"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">2##</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#timesWord%23"><span class="hs-operator hs-var">`timesWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034013"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1106"></span><span>
</span><span id="line-1107"></span><span class="hs-comment">-- | Logarithm for an arbitrary base</span><span>
</span><span id="line-1108"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLogBase"><span class="hs-identifier hs-type">bigNatLogBase</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-1109"></span><span id="bigNatLogBase"><span class="annot"><span class="annottext">bigNatLogBase :: BigNat# -&gt; BigNat# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatLogBase"><span class="hs-identifier hs-var hs-var">bigNatLogBase</span></a></span></span><span> </span><span id="local-6989586621679034011"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034011"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679034010"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034010"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatLogBase%23"><span class="hs-identifier hs-var">bigNatLogBase#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034011"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034010"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1110"></span><span>
</span><span id="line-1111"></span><span class="hs-comment">-- | Logarithm for an arbitrary base</span><span>
</span><span id="line-1112"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLogBaseWord%23"><span class="hs-identifier hs-type">bigNatLogBaseWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-1113"></span><span id="bigNatLogBaseWord%23"><span class="annot"><span class="annottext">bigNatLogBaseWord# :: Word# -&gt; BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatLogBaseWord%23"><span class="hs-identifier hs-var hs-var">bigNatLogBaseWord#</span></a></span></span><span> </span><span id="local-6989586621679034008"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034008"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679034007"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034007"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-1114"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034008"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#unexpectedValue_Word%23"><span class="hs-identifier hs-var">unexpectedValue_Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-1115"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034008"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#unexpectedValue_Word%23"><span class="hs-identifier hs-var">unexpectedValue_Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-1116"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">2##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034008"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatLog2%23"><span class="hs-identifier hs-var">bigNatLog2#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034007"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1117"></span><span>   </span><span class="hs-comment">-- TODO: optimize log base power of 2 (256, etc.)</span><span>
</span><span id="line-1118"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatLogBase%23"><span class="hs-identifier hs-var">bigNatLogBase#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034008"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034007"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1119"></span><span>
</span><span id="line-1120"></span><span class="hs-comment">-- | Logarithm for an arbitrary base</span><span>
</span><span id="line-1121"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatLogBaseWord"><span class="hs-identifier hs-type">bigNatLogBaseWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-1122"></span><span id="bigNatLogBaseWord"><span class="annot"><span class="annottext">bigNatLogBaseWord :: Word -&gt; BigNat# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatLogBaseWord"><span class="hs-identifier hs-var hs-var">bigNatLogBaseWord</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679034005"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034005"><span class="hs-identifier hs-var">base</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679034004"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034004"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatLogBaseWord%23"><span class="hs-identifier hs-var">bigNatLogBaseWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034005"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034004"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1123"></span><span>
</span><span id="line-1124"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1125"></span><span class="hs-comment">-- Various</span><span>
</span><span id="line-1126"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1127"></span><span>
</span><span id="line-1128"></span><span class="hs-comment">-- | Compute the number of digits of the BigNat in the given base.</span><span>
</span><span id="line-1129"></span><span class="hs-comment">--</span><span>
</span><span id="line-1130"></span><span class="hs-comment">-- `base` must be &gt; 1</span><span>
</span><span id="line-1131"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatSizeInBase%23"><span class="hs-identifier hs-type">bigNatSizeInBase#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-1132"></span><span id="bigNatSizeInBase%23"><span class="annot"><span class="annottext">bigNatSizeInBase# :: Word# -&gt; BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatSizeInBase%23"><span class="hs-identifier hs-var hs-var">bigNatSizeInBase#</span></a></span></span><span> </span><span id="local-6989586621679034002"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034002"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679034001"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034001"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-1133"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034002"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#leWord%23"><span class="hs-operator hs-var">`leWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span>
</span><span id="line-1134"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#unexpectedValue_Word%23"><span class="hs-identifier hs-var">unexpectedValue_Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-1135"></span><span>
</span><span id="line-1136"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034001"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1137"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-1138"></span><span>
</span><span id="line-1139"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-1140"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatLogBaseWord%23"><span class="hs-identifier hs-var">bigNatLogBaseWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679034002"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679034001"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span>
</span><span id="line-1141"></span><span>
</span><span id="line-1142"></span><span class="hs-comment">-- | Compute the number of digits of the BigNat in the given base.</span><span>
</span><span id="line-1143"></span><span class="hs-comment">--</span><span>
</span><span id="line-1144"></span><span class="hs-comment">-- `base` must be &gt; 1</span><span>
</span><span id="line-1145"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatSizeInBase"><span class="hs-identifier hs-type">bigNatSizeInBase</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-1146"></span><span id="bigNatSizeInBase"><span class="annot"><span class="annottext">bigNatSizeInBase :: Word -&gt; BigNat# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatSizeInBase"><span class="hs-identifier hs-var hs-var">bigNatSizeInBase</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679033999"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033999"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679033998"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033998"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatSizeInBase%23"><span class="hs-identifier hs-var">bigNatSizeInBase#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033999"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033998"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1147"></span><span>
</span><span id="line-1148"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1149"></span><span class="hs-comment">-- PowMod</span><span>
</span><span id="line-1150"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1151"></span><span>
</span><span id="line-1152"></span><span class="hs-comment">-- Word# powMod shouldn't be here in BigNat. However GMP provides a very fast</span><span>
</span><span id="line-1153"></span><span class="hs-comment">-- implementation so we keep this here at least until we get a native Haskell</span><span>
</span><span id="line-1154"></span><span class="hs-comment">-- implementation as fast as GMP's one.</span><span>
</span><span id="line-1155"></span><span>
</span><span id="line-1156"></span><span class="annot"><a href="GHC.Num.BigNat.html#powModWord%23"><span class="hs-identifier hs-type">powModWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-1157"></span><span id="powModWord%23"><span class="annot"><span class="annottext">powModWord# :: Word# -&gt; Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#powModWord%23"><span class="hs-identifier hs-var hs-var">powModWord#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_powmod_words"><span class="hs-identifier hs-var">bignat_powmod_words</span></a></span><span>
</span><span id="line-1158"></span><span>
</span><span id="line-1159"></span><span>
</span><span id="line-1160"></span><span class="hs-comment">-- | \&quot;@'bigNatPowModWord#' /b/ /e/ /m/@\&quot; computes base @/b/@ raised to</span><span>
</span><span id="line-1161"></span><span class="hs-comment">-- exponent @/e/@ modulo @/m/@.</span><span>
</span><span id="line-1162"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatPowModWord%23"><span class="hs-identifier hs-type">bigNatPowModWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-1163"></span><span id="bigNatPowModWord%23"><span class="annot"><span class="annottext">bigNatPowModWord# :: BigNat# -&gt; BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatPowModWord%23"><span class="hs-identifier hs-var hs-var">bigNatPowModWord#</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">BigNat#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">BigNat#
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#raiseDivZero_Word%23"><span class="hs-identifier hs-var">raiseDivZero_Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-1164"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatPowModWord%23"><span class="hs-identifier hs-var">bigNatPowModWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">BigNat#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-1165"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatPowModWord%23"><span class="hs-identifier hs-var">bigNatPowModWord#</span></a></span><span> </span><span id="local-6989586621679033994"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033994"><span class="hs-identifier hs-var">b</span></a></span></span><span>  </span><span id="local-6989586621679033993"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033993"><span class="hs-identifier hs-var">e</span></a></span></span><span>  </span><span id="local-6989586621679033992"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033992"><span class="hs-identifier hs-var">m</span></a></span></span><span>
</span><span id="line-1166"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033993"><span class="hs-identifier hs-var">e</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span>
</span><span id="line-1167"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033994"><span class="hs-identifier hs-var">b</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-1168"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span>  </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033994"><span class="hs-identifier hs-var">b</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span>
</span><span id="line-1169"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_powmod_word"><span class="hs-identifier hs-var">bignat_powmod_word</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033994"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033993"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033992"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-1170"></span><span>
</span><span id="line-1171"></span><span class="hs-comment">-- | \&quot;@'bigNatPowMod' /b/ /e/ /m/@\&quot; computes base @/b/@ raised to</span><span>
</span><span id="line-1172"></span><span class="hs-comment">-- exponent @/e/@ modulo @/m/@.</span><span>
</span><span id="line-1173"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatPowMod"><span class="hs-identifier hs-type">bigNatPowMod</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-1174"></span><span id="bigNatPowMod"><span class="annot"><span class="annottext">bigNatPowMod :: BigNat# -&gt; BigNat# -&gt; BigNat# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatPowMod"><span class="hs-identifier hs-var hs-var">bigNatPowMod</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679033989"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033989"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679033988"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033988"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679033987"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033987"><span class="hs-identifier hs-var">m</span></a></span></span><span>
</span><span id="line-1175"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679033986"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033986"><span class="hs-identifier hs-var">m'</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; (# (# #) | Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToWordMaybe%23"><span class="hs-identifier hs-var">bigNatToWordMaybe#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033987"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-1176"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatPowModWord%23"><span class="hs-identifier hs-var">bigNatPowModWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033989"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033988"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033986"><span class="hs-identifier hs-var">m'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1177"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033987"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#raiseDivZero_BigNat"><span class="hs-identifier hs-var">raiseDivZero_BigNat</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-1178"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span>  </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033987"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-1179"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033988"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span>
</span><span id="line-1180"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033989"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-1181"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsOne"><span class="hs-identifier hs-var">bigNatIsOne</span></a></span><span>  </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033989"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWord%23"><span class="hs-identifier hs-var">bigNatFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span>
</span><span id="line-1182"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArrayTrimed%23"><span class="hs-identifier hs-var">withNewWordArrayTrimed#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033987"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679033985"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033985"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033984"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033984"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1183"></span><span>                         </span><span class="annot"><span class="annottext">(MutableWordArray# RealWorld
 -&gt; BigNat#
 -&gt; BigNat#
 -&gt; BigNat#
 -&gt; State# RealWorld
 -&gt; State# RealWorld)
-&gt; MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#inline"><span class="hs-identifier hs-var">inline</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; BigNat#
-&gt; BigNat#
-&gt; BigNat#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_powmod"><span class="hs-identifier hs-var">bignat_powmod</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033985"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033989"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033988"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033987"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033984"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1184"></span><span>
</span><span id="line-1185"></span><span class="hs-comment">-- | Return count of trailing zero bits</span><span>
</span><span id="line-1186"></span><span class="hs-comment">--</span><span>
</span><span id="line-1187"></span><span class="hs-comment">-- Return 0 for zero BigNat</span><span>
</span><span id="line-1188"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatCtz%23"><span class="hs-identifier hs-type">bigNatCtz#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-1189"></span><span id="bigNatCtz%23"><span class="annot"><span class="annottext">bigNatCtz# :: BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatCtz%23"><span class="hs-identifier hs-var hs-var">bigNatCtz#</span></a></span></span><span> </span><span id="local-6989586621679033981"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033981"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-1190"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033981"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-1191"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679033980"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-1192"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-1193"></span><span>         </span><span id="local-6989586621679033980"><span class="annot"><span class="annottext">go :: Bool# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679033980"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033979"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033979"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679033978"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033978"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033981"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033979"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1194"></span><span>            </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679033980"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033979"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033978"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BITS##</span><span class="hs-special">)</span><span>
</span><span id="line-1195"></span><span>            </span><span id="local-6989586621679033977"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033977"><span class="hs-identifier hs-var">w</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#ctz%23"><span class="hs-identifier hs-var">ctz#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033977"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033978"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-1196"></span><span>
</span><span id="line-1197"></span><span class="hs-comment">-- | Return count of trailing zero bits</span><span>
</span><span id="line-1198"></span><span class="hs-comment">--</span><span>
</span><span id="line-1199"></span><span class="hs-comment">-- Return 0 for zero BigNat</span><span>
</span><span id="line-1200"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatCtz"><span class="hs-identifier hs-type">bigNatCtz</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-1201"></span><span id="bigNatCtz"><span class="annot"><span class="annottext">bigNatCtz :: BigNat# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatCtz"><span class="hs-identifier hs-var hs-var">bigNatCtz</span></a></span></span><span> </span><span id="local-6989586621679033975"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033975"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatCtz%23"><span class="hs-identifier hs-var">bigNatCtz#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033975"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1202"></span><span>
</span><span id="line-1203"></span><span>
</span><span id="line-1204"></span><span class="hs-comment">-- | Return count of trailing zero words</span><span>
</span><span id="line-1205"></span><span class="hs-comment">--</span><span>
</span><span id="line-1206"></span><span class="hs-comment">-- Return 0 for zero BigNat</span><span>
</span><span id="line-1207"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatCtzWord%23"><span class="hs-identifier hs-type">bigNatCtzWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-1208"></span><span id="bigNatCtzWord%23"><span class="annot"><span class="annottext">bigNatCtzWord# :: BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatCtzWord%23"><span class="hs-identifier hs-var hs-var">bigNatCtzWord#</span></a></span></span><span> </span><span id="local-6989586621679033973"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033973"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-1209"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatIsZero"><span class="hs-identifier hs-var">bigNatIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033973"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-1210"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679033972"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-1211"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-1212"></span><span>         </span><span id="local-6989586621679033972"><span class="annot"><span class="annottext">go :: Bool# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679033972"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033971"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033971"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679033970"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033970"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033973"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033971"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1213"></span><span>            </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679033972"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033971"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033970"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span>
</span><span id="line-1214"></span><span>            </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033970"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-1215"></span><span>
</span><span id="line-1216"></span><span class="hs-comment">-- | Return count of trailing zero words</span><span>
</span><span id="line-1217"></span><span class="hs-comment">--</span><span>
</span><span id="line-1218"></span><span class="hs-comment">-- Return 0 for zero BigNat</span><span>
</span><span id="line-1219"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatCtzWord"><span class="hs-identifier hs-type">bigNatCtzWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-1220"></span><span id="bigNatCtzWord"><span class="annot"><span class="annottext">bigNatCtzWord :: BigNat# -&gt; Word
</span><a href="GHC.Num.BigNat.html#bigNatCtzWord"><span class="hs-identifier hs-var hs-var">bigNatCtzWord</span></a></span></span><span> </span><span id="local-6989586621679033968"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033968"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatCtzWord%23"><span class="hs-identifier hs-var">bigNatCtzWord#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033968"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1221"></span><span>
</span><span id="line-1222"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1223"></span><span class="hs-comment">-- Export to memory</span><span>
</span><span id="line-1224"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1225"></span><span>
</span><span id="line-1226"></span><span class="hs-comment">-- | Write a BigNat in base-256 little-endian representation and return the</span><span>
</span><span id="line-1227"></span><span class="hs-comment">-- number of bytes written.</span><span>
</span><span id="line-1228"></span><span class="hs-comment">--</span><span>
</span><span id="line-1229"></span><span class="hs-comment">-- Use \&quot;@'bigNatSizeInBase' 256# /i/@\&quot; to compute the exact number of bytes</span><span>
</span><span id="line-1230"></span><span class="hs-comment">-- written in advance. In case of @/i/ == 0@, the function will write and report</span><span>
</span><span id="line-1231"></span><span class="hs-comment">-- zero bytes written.</span><span>
</span><span id="line-1232"></span><span id="local-6989586621679034596"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToAddrLE%23"><span class="hs-identifier hs-type">bigNatToAddrLE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034596"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034596"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1233"></span><span id="bigNatToAddrLE%23"><span class="annot"><span class="annottext">bigNatToAddrLE# :: forall s. BigNat# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToAddrLE%23"><span class="hs-identifier hs-var hs-var">bigNatToAddrLE#</span></a></span></span><span> </span><span id="local-6989586621679033966"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033966"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033965"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033965"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621679033964"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033964"><span class="hs-identifier hs-var">s0</span></a></span></span><span>
</span><span id="line-1234"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033963"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033964"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1235"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">State# s -&gt; (# State# s, Word# #)
forall {s}. State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679033962"><span class="hs-identifier hs-var">writeMSB</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033964"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1236"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033961"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033961"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033960"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033960"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; State# s -&gt; State# s
forall {s}. Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033959"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033961"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1237"></span><span>         </span><span id="local-6989586621679033958"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033958"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033958"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033960"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033957"><span class="hs-identifier hs-var">li</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1238"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-1239"></span><span>     </span><span class="hs-glyph">!</span><span id="local-6989586621679033963"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679033963"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033966"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1240"></span><span>     </span><span class="hs-glyph">!</span><span id="local-6989586621679033957"><span class="annot"><span class="annottext">li :: Bool#
</span><a href="#local-6989586621679033957"><span class="hs-identifier hs-var hs-var">li</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033963"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-1241"></span><span>
</span><span id="line-1242"></span><span>     </span><span id="local-6989586621679033962"><span class="annot"><span class="annottext">writeMSB :: State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679033962"><span class="hs-identifier hs-var hs-var">writeMSB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToAddrLE%23"><span class="hs-identifier hs-var">wordToAddrLE#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033966"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033957"><span class="hs-identifier hs-var">li</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1243"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033965"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; Addr#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusAddr%23"><span class="hs-operator hs-var">`plusAddr#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033957"><span class="hs-identifier hs-var">li</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-operator hs-var">`uncheckedIShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1244"></span><span>
</span><span id="line-1245"></span><span>     </span><span id="local-6989586621679033959"><span class="annot"><span class="annottext">go :: Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033959"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033955"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033955"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679033954"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033954"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1246"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033955"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033957"><span class="hs-identifier hs-var">li</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1247"></span><span>      </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033953"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033953"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033955"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-operator hs-var">`uncheckedIShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span>
</span><span id="line-1248"></span><span>      </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033952"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033952"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033966"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033955"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-1249"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; State# s
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Primitives.html#wordWriteAddrLE%23"><span class="hs-identifier hs-var">wordWriteAddrLE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033952"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033965"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; Addr#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusAddr%23"><span class="hs-operator hs-var">`plusAddr#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033953"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033954"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1250"></span><span>         </span><span id="local-6989586621679033950"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033950"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033959"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033955"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033950"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1251"></span><span>
</span><span id="line-1252"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-1253"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033954"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1254"></span><span>
</span><span id="line-1255"></span><span class="hs-comment">-- | Write a BigNat in base-256 big-endian representation and return the</span><span>
</span><span id="line-1256"></span><span class="hs-comment">-- number of bytes written.</span><span>
</span><span id="line-1257"></span><span class="hs-comment">--</span><span>
</span><span id="line-1258"></span><span class="hs-comment">-- Use \&quot;@'bigNatSizeInBase' 256# /i/@\&quot; to compute the exact number of bytes</span><span>
</span><span id="line-1259"></span><span class="hs-comment">-- written in advance. In case of @/i/ == 0@, the function will write and report</span><span>
</span><span id="line-1260"></span><span class="hs-comment">-- zero bytes written.</span><span>
</span><span id="line-1261"></span><span id="local-6989586621679033949"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToAddrBE%23"><span class="hs-identifier hs-type">bigNatToAddrBE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033949"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033949"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1262"></span><span id="bigNatToAddrBE%23"><span class="annot"><span class="annottext">bigNatToAddrBE# :: forall s. BigNat# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToAddrBE%23"><span class="hs-identifier hs-var hs-var">bigNatToAddrBE#</span></a></span></span><span> </span><span id="local-6989586621679033947"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033947"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033946"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033946"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621679033945"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033945"><span class="hs-identifier hs-var">s0</span></a></span></span><span>
</span><span id="line-1263"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033944"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033945"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1264"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679033943"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033943"><span class="hs-identifier hs-var">msw</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033947"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033944"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-1265"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToAddrBE%23"><span class="hs-identifier hs-var">wordToAddrBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033943"><span class="hs-identifier hs-var">msw</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033946"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033945"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1266"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033941"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033941"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033940"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033940"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Addr# -&gt; State# s -&gt; State# s
forall {s}. Bool# -&gt; Addr# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033939"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033944"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033946"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; Addr#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusAddr%23"><span class="hs-operator hs-var">`plusAddr#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033940"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033941"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1267"></span><span>         </span><span id="local-6989586621679033938"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033938"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033938"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033940"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033944"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1268"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-1269"></span><span>     </span><span id="local-6989586621679033944"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679033944"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033947"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1270"></span><span>
</span><span id="line-1271"></span><span>     </span><span id="local-6989586621679033939"><span class="annot"><span class="annottext">go :: Bool# -&gt; Addr# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033939"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033937"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033937"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679033936"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033936"><span class="hs-identifier hs-var">adr</span></a></span></span><span> </span><span id="local-6989586621679033935"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033935"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1272"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033937"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-1273"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033935"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1274"></span><span>
</span><span id="line-1275"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679033934"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033934"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033947"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033937"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-1276"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; State# s
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Primitives.html#wordWriteAddrBE%23"><span class="hs-identifier hs-var">wordWriteAddrBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033934"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033936"><span class="hs-identifier hs-var">adr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033935"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1277"></span><span>         </span><span id="local-6989586621679033932"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033932"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Addr# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033939"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033937"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-1278"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033936"><span class="hs-identifier hs-var">adr</span></a></span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; Addr#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusAddr%23"><span class="hs-operator hs-var">`plusAddr#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BYTES#</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">s'</span><span>
</span><span id="line-1279"></span><span>
</span><span id="line-1280"></span><span>
</span><span id="line-1281"></span><span class="hs-comment">-- | Write a BigNat in base-256 representation and return the</span><span>
</span><span id="line-1282"></span><span class="hs-comment">-- number of bytes written.</span><span>
</span><span id="line-1283"></span><span class="hs-comment">--</span><span>
</span><span id="line-1284"></span><span class="hs-comment">-- The endianness is selected with the Bool# parameter: most significant</span><span>
</span><span id="line-1285"></span><span class="hs-comment">-- byte first (big-endian) if @1#@ or least significant byte first</span><span>
</span><span id="line-1286"></span><span class="hs-comment">-- (little-endian) if @0#@.</span><span>
</span><span id="line-1287"></span><span class="hs-comment">--</span><span>
</span><span id="line-1288"></span><span class="hs-comment">-- Use \&quot;@'bigNatSizeInBase' 256# /i/@\&quot; to compute the exact number of bytes</span><span>
</span><span id="line-1289"></span><span class="hs-comment">-- written in advance. In case of @/i/ == 0@, the function will write and report</span><span>
</span><span id="line-1290"></span><span class="hs-comment">-- zero bytes written.</span><span>
</span><span id="line-1291"></span><span id="local-6989586621679034588"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToAddr%23"><span class="hs-identifier hs-type">bigNatToAddr#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034588"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034588"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1292"></span><span id="bigNatToAddr%23"><span class="annot"><span class="annottext">bigNatToAddr# :: forall s.
BigNat# -&gt; Addr# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToAddr%23"><span class="hs-identifier hs-var hs-var">bigNatToAddr#</span></a></span></span><span> </span><span id="local-6989586621679033930"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033930"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033929"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033929"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span id="local-6989586621679033928"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033928"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. BigNat# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToAddrLE%23"><span class="hs-identifier hs-var">bigNatToAddrLE#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033930"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033929"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033928"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1293"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToAddr%23"><span class="hs-identifier hs-var">bigNatToAddr#</span></a></span><span> </span><span id="local-6989586621679033927"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033927"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033926"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033926"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679033925"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033925"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. BigNat# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToAddrBE%23"><span class="hs-identifier hs-var">bigNatToAddrBE#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033927"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033926"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033925"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1294"></span><span>
</span><span id="line-1295"></span><span class="hs-comment">-- | Write a BigNat in base-256 representation and return the</span><span>
</span><span id="line-1296"></span><span class="hs-comment">-- number of bytes written.</span><span>
</span><span id="line-1297"></span><span class="hs-comment">--</span><span>
</span><span id="line-1298"></span><span class="hs-comment">-- The endianness is selected with the Bool# parameter: most significant</span><span>
</span><span id="line-1299"></span><span class="hs-comment">-- byte first (big-endian) if @1#@ or least significant byte first</span><span>
</span><span id="line-1300"></span><span class="hs-comment">-- (little-endian) if @0#@.</span><span>
</span><span id="line-1301"></span><span class="hs-comment">--</span><span>
</span><span id="line-1302"></span><span class="hs-comment">-- Use \&quot;@'bigNatSizeInBase' 256# /i/@\&quot; to compute the exact number of bytes</span><span>
</span><span id="line-1303"></span><span class="hs-comment">-- written in advance. In case of @/i/ == 0@, the function will write and report</span><span>
</span><span id="line-1304"></span><span class="hs-comment">-- zero bytes written.</span><span>
</span><span id="line-1305"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToAddr"><span class="hs-identifier hs-type">bigNatToAddr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-1306"></span><span id="bigNatToAddr"><span class="annot"><span class="annottext">bigNatToAddr :: BigNat# -&gt; Addr# -&gt; Bool# -&gt; IO Word
</span><a href="GHC.Num.BigNat.html#bigNatToAddr"><span class="hs-identifier hs-var hs-var">bigNatToAddr</span></a></span></span><span> </span><span id="local-6989586621679033923"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033923"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033922"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033922"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621679033921"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033921"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(State# RealWorld -&gt; (# State# RealWorld, Word #)) -&gt; IO Word
forall a. (State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
</span><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-var">IO</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679033920"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033920"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BigNat#
-&gt; Addr#
-&gt; Bool#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Word# #)
forall s.
BigNat# -&gt; Addr# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToAddr%23"><span class="hs-identifier hs-var">bigNatToAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033923"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033922"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033921"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033920"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1307"></span><span>   </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033919"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033919"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033918"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033918"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033919"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033918"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1308"></span><span>
</span><span id="line-1309"></span><span>
</span><span id="line-1310"></span><span>
</span><span id="line-1311"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1312"></span><span class="hs-comment">-- Import from memory</span><span>
</span><span id="line-1313"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1314"></span><span>
</span><span id="line-1315"></span><span class="hs-comment">-- | Read a BigNat in base-256 little-endian representation from an Addr#.</span><span>
</span><span id="line-1316"></span><span class="hs-comment">--</span><span>
</span><span id="line-1317"></span><span class="hs-comment">-- The size is given in bytes.</span><span>
</span><span id="line-1318"></span><span class="hs-comment">--</span><span>
</span><span id="line-1319"></span><span class="hs-comment">-- Higher limbs equal to 0 are automatically trimed.</span><span>
</span><span id="line-1320"></span><span id="local-6989586621679034585"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromAddrLE%23"><span class="hs-identifier hs-type">bigNatFromAddrLE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034585"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034585"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1321"></span><span id="bigNatFromAddrLE%23"><span class="annot"><span class="annottext">bigNatFromAddrLE# :: forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatFromAddrLE%23"><span class="hs-identifier hs-var hs-var">bigNatFromAddrLE#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><span class="hs-identifier">_</span></span><span>    </span><span id="local-6989586621679033916"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033916"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033916"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1322"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromAddrLE%23"><span class="hs-identifier hs-var">bigNatFromAddrLE#</span></a></span><span> </span><span id="local-6989586621679033915"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033915"><span class="hs-identifier hs-var">sz</span></a></span></span><span>  </span><span id="local-6989586621679033914"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033914"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621679033913"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033913"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1323"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-1324"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033912"><span class="annot"><span class="annottext">nw :: Word#
</span><a href="#local-6989586621679033912"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033915"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span>
</span><span id="line-1325"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033911"><span class="annot"><span class="annottext">nb :: Word#
</span><a href="#local-6989586621679033911"><span class="hs-identifier hs-var hs-var">nb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033915"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_MASK##</span><span>
</span><span id="line-1326"></span><span>
</span><span id="line-1327"></span><span>      </span><span id="local-6989586621679033910"><span class="annot"><span class="annottext">readMSB :: MutableWordArray# s -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033910"><span class="hs-identifier hs-var hs-var">readMSB</span></a></span></span><span> </span><span id="local-6989586621679033909"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033909"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033908"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033908"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1328"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033911"><span class="hs-identifier hs-var">nb</span></a></span><span>
</span><span id="line-1329"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033908"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1330"></span><span>
</span><span id="line-1331"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679033907"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033907"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033912"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span class="hs-special">)</span><span>
</span><span id="line-1332"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordFromAddrLE%23"><span class="hs-identifier hs-var">wordFromAddrLE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033911"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033914"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; Addr#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusAddr%23"><span class="hs-operator hs-var">`plusAddr#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033907"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033908"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1333"></span><span>            </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033905"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033905"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033904"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033904"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033909"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033912"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033904"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033905"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1334"></span><span>
</span><span id="line-1335"></span><span>      </span><span id="local-6989586621679033903"><span class="annot"><span class="annottext">go :: MutableWordArray# s -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033903"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033902"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033902"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033901"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033901"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679033900"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033900"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1336"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033901"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033912"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1337"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033900"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1338"></span><span>
</span><span id="line-1339"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679033899"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033899"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033901"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-operator hs-var">`uncheckedIShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span>
</span><span id="line-1340"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordFromAddrLE%23"><span class="hs-identifier hs-var">wordFromAddrLE#</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BYTES##</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">addr</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033900"><span class="hs-special hs-var">`</span></a></span><span class="hs-identifier">plusAddr#</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">off</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">s</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1341"></span><span>            </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033898"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033898"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033897"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033897"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033902"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033901"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033897"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033898"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1342"></span><span>               </span><span id="local-6989586621679033896"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033896"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033903"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033902"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033901"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033896"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1343"></span><span>
</span><span id="line-1344"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
forall s. Bool# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="GHC.Num.WordArray.html#newWordArray%23"><span class="hs-identifier hs-var">newWordArray#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033912"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033911"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2F%3D%23"><span class="hs-operator hs-var">/=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033913"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1345"></span><span>         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033895"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033895"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033894"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033894"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033910"><span class="hs-identifier hs-var">readMSB</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033894"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033895"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1346"></span><span>            </span><span id="local-6989586621679033893"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033893"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; State# s -&gt; State# s
forall {s}. MutableWordArray# s -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033903"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033894"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033893"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1347"></span><span>               </span><span id="local-6989586621679033892"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033892"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaTrimZeroes%23"><span class="hs-identifier hs-var">mwaTrimZeroes#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033894"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033892"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1348"></span><span>                  </span><span id="local-6989586621679033891"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033891"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; (# State# s, BigNat# #)
forall d.
MutableByteArray# d -&gt; State# d -&gt; (# State# d, BigNat# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#unsafeFreezeByteArray%23"><span class="hs-identifier hs-var">unsafeFreezeByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033894"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033891"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1349"></span><span>
</span><span id="line-1350"></span><span class="hs-comment">-- | Read a BigNat in base-256 big-endian representation from an Addr#.</span><span>
</span><span id="line-1351"></span><span class="hs-comment">--</span><span>
</span><span id="line-1352"></span><span class="hs-comment">-- The size is given in bytes.</span><span>
</span><span id="line-1353"></span><span class="hs-comment">--</span><span>
</span><span id="line-1354"></span><span class="hs-comment">-- Null higher limbs are automatically trimed.</span><span>
</span><span id="line-1355"></span><span id="local-6989586621679033890"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromAddrBE%23"><span class="hs-identifier hs-type">bigNatFromAddrBE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033890"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033890"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1356"></span><span id="bigNatFromAddrBE%23"><span class="annot"><span class="annottext">bigNatFromAddrBE# :: forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatFromAddrBE%23"><span class="hs-identifier hs-var hs-var">bigNatFromAddrBE#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><span class="hs-identifier">_</span></span><span>    </span><span id="local-6989586621679033888"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033888"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033888"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1357"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromAddrBE%23"><span class="hs-identifier hs-var">bigNatFromAddrBE#</span></a></span><span> </span><span id="local-6989586621679033887"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033887"><span class="hs-identifier hs-var">sz</span></a></span></span><span>  </span><span id="local-6989586621679033886"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033886"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621679033885"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033885"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1358"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-1359"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033884"><span class="annot"><span class="annottext">nw :: Bool#
</span><a href="#local-6989586621679033884"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033887"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span class="hs-special">)</span><span>
</span><span id="line-1360"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033883"><span class="annot"><span class="annottext">nb :: Word#
</span><a href="#local-6989586621679033883"><span class="hs-identifier hs-var hs-var">nb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033887"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_MASK##</span><span>
</span><span id="line-1361"></span><span>
</span><span id="line-1362"></span><span>      </span><span id="local-6989586621679033882"><span class="annot"><span class="annottext">goMSB :: MutableWordArray# s -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033882"><span class="hs-identifier hs-var hs-var">goMSB</span></a></span></span><span> </span><span id="local-6989586621679033881"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033881"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033880"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033880"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1363"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033883"><span class="hs-identifier hs-var">nb</span></a></span><span>
</span><span id="line-1364"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033880"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1365"></span><span>
</span><span id="line-1366"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-1367"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordFromAddrBE%23"><span class="hs-identifier hs-var">wordFromAddrBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033883"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033886"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033880"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1368"></span><span>            </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033878"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033878"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033877"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033877"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033881"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033884"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033877"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033878"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1369"></span><span>
</span><span id="line-1370"></span><span>      </span><span id="local-6989586621679033876"><span class="annot"><span class="annottext">go :: MutableWordArray# s -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033876"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033875"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033875"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033874"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033874"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679033873"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033873"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1371"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033874"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033884"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1372"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033873"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1373"></span><span>
</span><span id="line-1374"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679033872"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033872"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033884"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033874"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-1375"></span><span>         </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033871"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033871"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033872"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-operator hs-var">`uncheckedIShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span class="hs-special">)</span><span> </span><span class="hs-operator">+#</span><span> </span><span class="hs-identifier">word2Int#</span><span> </span><span class="hs-identifier">nb</span><span>
</span><span id="line-1376"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordFromAddrBE%23"><span class="hs-identifier hs-var">wordFromAddrBE#</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BYTES##</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">addr</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033873"><span class="hs-special hs-var">`</span></a></span><span class="hs-identifier">plusAddr#</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">off</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">s</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1377"></span><span>            </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033870"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033870"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033869"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033869"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033875"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033874"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033869"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033870"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1378"></span><span>               </span><span id="local-6989586621679033868"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033868"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033876"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033875"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033874"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033868"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1379"></span><span>
</span><span id="line-1380"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
forall s. Bool# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="GHC.Num.WordArray.html#newWordArray%23"><span class="hs-identifier hs-var">newWordArray#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033884"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033883"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2F%3D%23"><span class="hs-operator hs-var">/=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033885"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1381"></span><span>         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033867"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033867"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033866"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033866"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033882"><span class="hs-identifier hs-var">goMSB</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033866"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033867"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1382"></span><span>            </span><span id="local-6989586621679033865"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033865"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; State# s -&gt; State# s
forall {s}. MutableWordArray# s -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033876"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033866"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033865"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1383"></span><span>               </span><span id="local-6989586621679033864"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033864"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaTrimZeroes%23"><span class="hs-identifier hs-var">mwaTrimZeroes#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033866"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033864"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1384"></span><span>                  </span><span id="local-6989586621679033863"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033863"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; (# State# s, BigNat# #)
forall d.
MutableByteArray# d -&gt; State# d -&gt; (# State# d, BigNat# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#unsafeFreezeByteArray%23"><span class="hs-identifier hs-var">unsafeFreezeByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033866"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033863"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1385"></span><span>
</span><span id="line-1386"></span><span class="hs-comment">-- | Read a BigNat in base-256 representation from an Addr#.</span><span>
</span><span id="line-1387"></span><span class="hs-comment">--</span><span>
</span><span id="line-1388"></span><span class="hs-comment">-- The size is given in bytes.</span><span>
</span><span id="line-1389"></span><span class="hs-comment">--</span><span>
</span><span id="line-1390"></span><span class="hs-comment">-- The endianness is selected with the Bool# parameter: most significant</span><span>
</span><span id="line-1391"></span><span class="hs-comment">-- byte first (big-endian) if @1#@ or least significant byte first</span><span>
</span><span id="line-1392"></span><span class="hs-comment">-- (little-endian) if @0#@.</span><span>
</span><span id="line-1393"></span><span class="hs-comment">--</span><span>
</span><span id="line-1394"></span><span class="hs-comment">-- Null higher limbs are automatically trimed.</span><span>
</span><span id="line-1395"></span><span id="local-6989586621679034578"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromAddr%23"><span class="hs-identifier hs-type">bigNatFromAddr#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034578"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034578"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1396"></span><span id="bigNatFromAddr%23"><span class="annot"><span class="annottext">bigNatFromAddr# :: forall s.
Word# -&gt; Addr# -&gt; Bool# -&gt; State# s -&gt; (# State# s, BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatFromAddr%23"><span class="hs-identifier hs-var hs-var">bigNatFromAddr#</span></a></span></span><span> </span><span id="local-6989586621679033861"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033861"><span class="hs-identifier hs-var">sz</span></a></span></span><span> </span><span id="local-6989586621679033860"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033860"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span id="local-6989586621679033859"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033859"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, BigNat# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatFromAddrLE%23"><span class="hs-identifier hs-var">bigNatFromAddrLE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033861"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033860"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033859"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1397"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromAddr%23"><span class="hs-identifier hs-var">bigNatFromAddr#</span></a></span><span> </span><span id="local-6989586621679033858"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033858"><span class="hs-identifier hs-var">sz</span></a></span></span><span> </span><span id="local-6989586621679033857"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033857"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679033856"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033856"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, BigNat# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatFromAddrBE%23"><span class="hs-identifier hs-var">bigNatFromAddrBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033858"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679033857"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033856"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1398"></span><span>
</span><span id="line-1399"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1400"></span><span class="hs-comment">-- Export to ByteArray</span><span>
</span><span id="line-1401"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1402"></span><span>
</span><span id="line-1403"></span><span class="hs-comment">-- | Write a BigNat in base-256 little-endian representation and return the</span><span>
</span><span id="line-1404"></span><span class="hs-comment">-- number of bytes written.</span><span>
</span><span id="line-1405"></span><span class="hs-comment">--</span><span>
</span><span id="line-1406"></span><span class="hs-comment">-- Use \&quot;@'bigNatSizeInBase' 256# /i/@\&quot; to compute the exact number of bytes</span><span>
</span><span id="line-1407"></span><span class="hs-comment">-- written in advance. In case of @/i/ == 0@, the function will write and report</span><span>
</span><span id="line-1408"></span><span class="hs-comment">-- zero bytes written.</span><span>
</span><span id="line-1409"></span><span id="local-6989586621679034576"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToMutableByteArrayLE%23"><span class="hs-identifier hs-type">bigNatToMutableByteArrayLE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034576"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034576"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034576"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1410"></span><span id="bigNatToMutableByteArrayLE%23"><span class="annot"><span class="annottext">bigNatToMutableByteArrayLE# :: forall s.
BigNat#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToMutableByteArrayLE%23"><span class="hs-identifier hs-var hs-var">bigNatToMutableByteArrayLE#</span></a></span></span><span> </span><span id="local-6989586621679033854"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033854"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033853"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679033853"><span class="hs-identifier hs-var">mba</span></a></span></span><span> </span><span id="local-6989586621679033852"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033852"><span class="hs-identifier hs-var">moff</span></a></span></span><span> </span><span id="local-6989586621679033851"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033851"><span class="hs-identifier hs-var">s0</span></a></span></span><span>
</span><span id="line-1411"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033850"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033851"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1412"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679033849"><span class="hs-identifier hs-var">writeMSB</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033851"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1413"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033848"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033848"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033847"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033847"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033846"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033848"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1414"></span><span>         </span><span id="local-6989586621679033845"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033845"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033845"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033847"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033844"><span class="hs-identifier hs-var">li</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1415"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-1416"></span><span>     </span><span class="hs-glyph">!</span><span id="local-6989586621679033850"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679033850"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033854"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1417"></span><span>     </span><span class="hs-glyph">!</span><span id="local-6989586621679033844"><span class="annot"><span class="annottext">li :: Bool#
</span><a href="#local-6989586621679033844"><span class="hs-identifier hs-var hs-var">li</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033850"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-1418"></span><span>
</span><span id="line-1419"></span><span>     </span><span id="local-6989586621679033849"><span class="annot"><span class="annottext">writeMSB :: State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679033849"><span class="hs-identifier hs-var hs-var">writeMSB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
forall s.
Word#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToMutableByteArrayLE%23"><span class="hs-identifier hs-var">wordToMutableByteArrayLE#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033854"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033844"><span class="hs-identifier hs-var">li</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1420"></span><span>                  </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679033853"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033852"><span class="hs-identifier hs-var">moff</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033844"><span class="hs-identifier hs-var">li</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-operator hs-var">`uncheckedIShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1421"></span><span>
</span><span id="line-1422"></span><span>     </span><span id="local-6989586621679033846"><span class="annot"><span class="annottext">go :: Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033846"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033842"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033842"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679033841"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033841"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1423"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033842"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033844"><span class="hs-identifier hs-var">li</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1424"></span><span>      </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033840"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033840"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033842"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span>
</span><span id="line-1425"></span><span>      </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033839"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033839"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033854"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033842"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-1426"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; MutableByteArray# s -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
Word# -&gt; MutableByteArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Primitives.html#wordWriteMutableByteArrayLE%23"><span class="hs-identifier hs-var">wordWriteMutableByteArrayLE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033839"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679033853"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033852"><span class="hs-identifier hs-var">moff</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033840"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033841"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1427"></span><span>         </span><span id="local-6989586621679033837"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033837"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033846"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033842"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033837"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1428"></span><span>
</span><span id="line-1429"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-1430"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033841"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1431"></span><span>
</span><span id="line-1432"></span><span class="hs-comment">-- | Write a BigNat in base-256 big-endian representation and return the</span><span>
</span><span id="line-1433"></span><span class="hs-comment">-- number of bytes written.</span><span>
</span><span id="line-1434"></span><span class="hs-comment">--</span><span>
</span><span id="line-1435"></span><span class="hs-comment">-- Use \&quot;@'bigNatSizeInBase' 256# /i/@\&quot; to compute the exact number of bytes</span><span>
</span><span id="line-1436"></span><span class="hs-comment">-- written in advance. In case of @/i/ == 0@, the function will write and report</span><span>
</span><span id="line-1437"></span><span class="hs-comment">-- zero bytes written.</span><span>
</span><span id="line-1438"></span><span id="local-6989586621679033836"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToMutableByteArrayBE%23"><span class="hs-identifier hs-type">bigNatToMutableByteArrayBE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033836"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033836"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033836"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1439"></span><span id="bigNatToMutableByteArrayBE%23"><span class="annot"><span class="annottext">bigNatToMutableByteArrayBE# :: forall s.
BigNat#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToMutableByteArrayBE%23"><span class="hs-identifier hs-var hs-var">bigNatToMutableByteArrayBE#</span></a></span></span><span> </span><span id="local-6989586621679033834"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033834"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033833"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679033833"><span class="hs-identifier hs-var">mba</span></a></span></span><span> </span><span id="local-6989586621679033832"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033832"><span class="hs-identifier hs-var">moff</span></a></span></span><span> </span><span id="local-6989586621679033831"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033831"><span class="hs-identifier hs-var">s0</span></a></span></span><span>
</span><span id="line-1440"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033830"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033831"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1441"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679033829"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033829"><span class="hs-identifier hs-var">msw</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033834"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033830"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-1442"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
forall s.
Word#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToMutableByteArrayBE%23"><span class="hs-identifier hs-var">wordToMutableByteArrayBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033829"><span class="hs-identifier hs-var">msw</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679033833"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033832"><span class="hs-identifier hs-var">moff</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033831"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1443"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033827"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033827"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033826"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033826"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033825"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033830"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033826"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033827"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1444"></span><span>         </span><span id="local-6989586621679033824"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033824"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033824"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033826"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033830"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1445"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-1446"></span><span>     </span><span id="local-6989586621679033830"><span class="annot"><span class="annottext">sz :: Bool#
</span><a href="#local-6989586621679033830"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033834"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1447"></span><span>
</span><span id="line-1448"></span><span>     </span><span id="local-6989586621679033825"><span class="annot"><span class="annottext">go :: Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033825"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033823"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033823"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679033822"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033822"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679033821"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033821"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1449"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033823"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-1450"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033821"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1451"></span><span>
</span><span id="line-1452"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679033820"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033820"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033834"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033823"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-1453"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; MutableByteArray# s -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
Word# -&gt; MutableByteArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Primitives.html#wordWriteMutableByteArrayBE%23"><span class="hs-identifier hs-var">wordWriteMutableByteArrayBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033820"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679033833"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033832"><span class="hs-identifier hs-var">moff</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033822"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033821"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1454"></span><span>         </span><span id="local-6989586621679033818"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033818"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033825"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679033823"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-1455"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033822"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BYTES##</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">s'</span><span>
</span><span id="line-1456"></span><span>
</span><span id="line-1457"></span><span>
</span><span id="line-1458"></span><span class="hs-comment">-- | Write a BigNat in base-256 representation and return the</span><span>
</span><span id="line-1459"></span><span class="hs-comment">-- number of bytes written.</span><span>
</span><span id="line-1460"></span><span class="hs-comment">--</span><span>
</span><span id="line-1461"></span><span class="hs-comment">-- The endianness is selected with the Bool# parameter: most significant</span><span>
</span><span id="line-1462"></span><span class="hs-comment">-- byte first (big-endian) if @1#@ or least significant byte first</span><span>
</span><span id="line-1463"></span><span class="hs-comment">-- (little-endian) if @0#@.</span><span>
</span><span id="line-1464"></span><span class="hs-comment">--</span><span>
</span><span id="line-1465"></span><span class="hs-comment">-- Use \&quot;@'bigNatSizeInBase' 256# /i/@\&quot; to compute the exact number of bytes</span><span>
</span><span id="line-1466"></span><span class="hs-comment">-- written in advance. In case of @/i/ == 0@, the function will write and report</span><span>
</span><span id="line-1467"></span><span class="hs-comment">-- zero bytes written.</span><span>
</span><span id="line-1468"></span><span id="local-6989586621679034571"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToMutableByteArray%23"><span class="hs-identifier hs-type">bigNatToMutableByteArray#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034571"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034571"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034571"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1469"></span><span id="bigNatToMutableByteArray%23"><span class="annot"><span class="annottext">bigNatToMutableByteArray# :: forall s.
BigNat#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; Bool#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToMutableByteArray%23"><span class="hs-identifier hs-var hs-var">bigNatToMutableByteArray#</span></a></span></span><span> </span><span id="local-6989586621679033816"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033816"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033815"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679033815"><span class="hs-identifier hs-var">mba</span></a></span></span><span> </span><span id="local-6989586621679033814"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033814"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span id="local-6989586621679033813"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033813"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
forall s.
BigNat#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToMutableByteArrayLE%23"><span class="hs-identifier hs-var">bigNatToMutableByteArrayLE#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033816"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679033815"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033814"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033813"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1470"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatToMutableByteArray%23"><span class="hs-identifier hs-var">bigNatToMutableByteArray#</span></a></span><span> </span><span id="local-6989586621679033812"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033812"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033811"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679033811"><span class="hs-identifier hs-var">mba</span></a></span></span><span> </span><span id="local-6989586621679033810"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033810"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679033809"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033809"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
forall s.
BigNat#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.BigNat.html#bigNatToMutableByteArrayBE%23"><span class="hs-identifier hs-var">bigNatToMutableByteArrayBE#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033812"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679033811"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033810"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033809"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1471"></span><span>
</span><span id="line-1472"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1473"></span><span class="hs-comment">-- Import from ByteArray</span><span>
</span><span id="line-1474"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1475"></span><span>
</span><span id="line-1476"></span><span class="hs-comment">-- | Read a BigNat in base-256 little-endian representation from a ByteArray#.</span><span>
</span><span id="line-1477"></span><span class="hs-comment">--</span><span>
</span><span id="line-1478"></span><span class="hs-comment">-- The size is given in bytes.</span><span>
</span><span id="line-1479"></span><span class="hs-comment">--</span><span>
</span><span id="line-1480"></span><span class="hs-comment">-- Null higher limbs are automatically trimed.</span><span>
</span><span id="line-1481"></span><span id="local-6989586621679034569"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromByteArrayLE%23"><span class="hs-identifier hs-type">bigNatFromByteArrayLE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034569"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034569"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1482"></span><span id="bigNatFromByteArrayLE%23"><span class="annot"><span class="annottext">bigNatFromByteArrayLE# :: forall s.
Word# -&gt; BigNat# -&gt; Word# -&gt; State# s -&gt; (# State# s, BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatFromByteArrayLE%23"><span class="hs-identifier hs-var hs-var">bigNatFromByteArrayLE#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span>    </span><span id="local-6989586621679033807"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033807"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033807"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1483"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromByteArrayLE%23"><span class="hs-identifier hs-var">bigNatFromByteArrayLE#</span></a></span><span> </span><span id="local-6989586621679033806"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033806"><span class="hs-identifier hs-var">sz</span></a></span></span><span>  </span><span id="local-6989586621679033805"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033805"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span id="local-6989586621679033804"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033804"><span class="hs-identifier hs-var">moff</span></a></span></span><span> </span><span id="local-6989586621679033803"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033803"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1484"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-1485"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033802"><span class="annot"><span class="annottext">nw :: Word#
</span><a href="#local-6989586621679033802"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033806"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span>
</span><span id="line-1486"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033801"><span class="annot"><span class="annottext">nb :: Word#
</span><a href="#local-6989586621679033801"><span class="hs-identifier hs-var hs-var">nb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033806"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_MASK##</span><span>
</span><span id="line-1487"></span><span>
</span><span id="line-1488"></span><span>      </span><span id="local-6989586621679033800"><span class="annot"><span class="annottext">readMSB :: MutableWordArray# s -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033800"><span class="hs-identifier hs-var hs-var">readMSB</span></a></span></span><span> </span><span id="local-6989586621679033799"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033799"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033798"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033798"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1489"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033801"><span class="hs-identifier hs-var">nb</span></a></span><span>
</span><span id="line-1490"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033798"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1491"></span><span>
</span><span id="line-1492"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679033797"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033797"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033802"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span>
</span><span id="line-1493"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromByteArrayLE%23"><span class="hs-identifier hs-var">wordFromByteArrayLE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033801"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033805"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033804"><span class="hs-identifier hs-var">moff</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033797"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1494"></span><span>               </span><span id="local-6989586621679033795"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033795"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033799"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033802"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033795"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033798"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1495"></span><span>
</span><span id="line-1496"></span><span>      </span><span id="local-6989586621679033794"><span class="annot"><span class="annottext">go :: MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033794"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033793"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033793"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033792"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033792"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679033791"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033791"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1497"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033792"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033802"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1498"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033791"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1499"></span><span>
</span><span id="line-1500"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679033790"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033790"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033792"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span>
</span><span id="line-1501"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromByteArrayLE%23"><span class="hs-identifier hs-var">wordFromByteArrayLE#</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BYTES##</span><span> </span><span class="hs-identifier">ba</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">moff</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">plusWord#</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">off</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1502"></span><span>               </span><span id="local-6989586621679033789"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033789"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033793"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033792"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033789"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033791"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1503"></span><span>                  </span><span id="local-6989586621679033788"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033788"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033794"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033793"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033792"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033788"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1504"></span><span>
</span><span id="line-1505"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
forall s. Bool# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="GHC.Num.WordArray.html#newWordArray%23"><span class="hs-identifier hs-var">newWordArray#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033802"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033801"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2F%3D%23"><span class="hs-operator hs-var">/=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033803"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1506"></span><span>         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033787"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033787"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033786"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033786"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033800"><span class="hs-identifier hs-var">readMSB</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033786"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033787"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1507"></span><span>            </span><span id="local-6989586621679033785"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033785"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
forall {s}. MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033794"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033786"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033785"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1508"></span><span>               </span><span id="local-6989586621679033784"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033784"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaTrimZeroes%23"><span class="hs-identifier hs-var">mwaTrimZeroes#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033786"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033784"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1509"></span><span>                  </span><span id="local-6989586621679033783"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033783"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; (# State# s, BigNat# #)
forall d.
MutableByteArray# d -&gt; State# d -&gt; (# State# d, BigNat# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#unsafeFreezeByteArray%23"><span class="hs-identifier hs-var">unsafeFreezeByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033786"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033783"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1510"></span><span>
</span><span id="line-1511"></span><span class="hs-comment">-- | Read a BigNat in base-256 big-endian representation from a ByteArray#.</span><span>
</span><span id="line-1512"></span><span class="hs-comment">--</span><span>
</span><span id="line-1513"></span><span class="hs-comment">-- The size is given in bytes.</span><span>
</span><span id="line-1514"></span><span class="hs-comment">--</span><span>
</span><span id="line-1515"></span><span class="hs-comment">-- Null higher limbs are automatically trimed.</span><span>
</span><span id="line-1516"></span><span id="local-6989586621679033782"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromByteArrayBE%23"><span class="hs-identifier hs-type">bigNatFromByteArrayBE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033782"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033782"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1517"></span><span id="bigNatFromByteArrayBE%23"><span class="annot"><span class="annottext">bigNatFromByteArrayBE# :: forall s.
Word# -&gt; BigNat# -&gt; Word# -&gt; State# s -&gt; (# State# s, BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatFromByteArrayBE%23"><span class="hs-identifier hs-var hs-var">bigNatFromByteArrayBE#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span>    </span><span id="local-6989586621679033780"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033780"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033780"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1518"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromByteArrayBE%23"><span class="hs-identifier hs-var">bigNatFromByteArrayBE#</span></a></span><span> </span><span id="local-6989586621679033779"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033779"><span class="hs-identifier hs-var">sz</span></a></span></span><span>  </span><span id="local-6989586621679033778"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033778"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span id="local-6989586621679033777"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033777"><span class="hs-identifier hs-var">moff</span></a></span></span><span> </span><span id="local-6989586621679033776"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033776"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1519"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-1520"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033775"><span class="annot"><span class="annottext">nw :: Word#
</span><a href="#local-6989586621679033775"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033779"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span>
</span><span id="line-1521"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033774"><span class="annot"><span class="annottext">nb :: Word#
</span><a href="#local-6989586621679033774"><span class="hs-identifier hs-var hs-var">nb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033779"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_MASK##</span><span>
</span><span id="line-1522"></span><span>
</span><span id="line-1523"></span><span>      </span><span id="local-6989586621679033773"><span class="annot"><span class="annottext">goMSB :: MutableWordArray# s -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033773"><span class="hs-identifier hs-var hs-var">goMSB</span></a></span></span><span> </span><span id="local-6989586621679033772"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033772"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033771"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033771"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1524"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033774"><span class="hs-identifier hs-var">nb</span></a></span><span>
</span><span id="line-1525"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033771"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1526"></span><span>
</span><span id="line-1527"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-1528"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromByteArrayBE%23"><span class="hs-identifier hs-var">wordFromByteArrayBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033774"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033778"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033777"><span class="hs-identifier hs-var">moff</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1529"></span><span>            </span><span id="local-6989586621679033769"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033769"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033772"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033775"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033769"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033771"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1530"></span><span>
</span><span id="line-1531"></span><span>      </span><span id="local-6989586621679033768"><span class="annot"><span class="annottext">go :: MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033768"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033767"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033767"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033766"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033766"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679033765"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033765"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-1532"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033766"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033775"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1533"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033765"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1534"></span><span>
</span><span id="line-1535"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679033764"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033764"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033775"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#minusWord%23"><span class="hs-operator hs-var">`minusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#minusWord%23"><span class="hs-operator hs-var">`minusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033766"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-1536"></span><span>         </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033763"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033763"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033764"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BYTES_SHIFT#</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">plusWord#</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">nb</span><span>
</span><span id="line-1537"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromByteArrayBE%23"><span class="hs-identifier hs-var">wordFromByteArrayBE#</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BYTES##</span><span> </span><span class="hs-identifier">ba</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">moff</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">plusWord#</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">off</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1538"></span><span>            </span><span id="local-6989586621679033762"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033762"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033767"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033766"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033762"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033765"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1539"></span><span>               </span><span id="local-6989586621679033761"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033761"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033768"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033767"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033766"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033761"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1540"></span><span>
</span><span id="line-1541"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
forall s. Bool# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="GHC.Num.WordArray.html#newWordArray%23"><span class="hs-identifier hs-var">newWordArray#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033775"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033774"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2F%3D%23"><span class="hs-operator hs-var">/=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033776"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1542"></span><span>         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033760"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033760"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033759"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033759"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033773"><span class="hs-identifier hs-var">goMSB</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033759"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033760"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1543"></span><span>            </span><span id="local-6989586621679033758"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033758"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
forall {s}. MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679033768"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033759"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033758"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1544"></span><span>               </span><span id="local-6989586621679033757"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033757"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaTrimZeroes%23"><span class="hs-identifier hs-var">mwaTrimZeroes#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033759"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033757"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1545"></span><span>                  </span><span id="local-6989586621679033756"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033756"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; (# State# s, BigNat# #)
forall d.
MutableByteArray# d -&gt; State# d -&gt; (# State# d, BigNat# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#unsafeFreezeByteArray%23"><span class="hs-identifier hs-var">unsafeFreezeByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679033759"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033756"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1546"></span><span>
</span><span id="line-1547"></span><span class="hs-comment">-- | Read a BigNat in base-256 representation from a ByteArray#.</span><span>
</span><span id="line-1548"></span><span class="hs-comment">--</span><span>
</span><span id="line-1549"></span><span class="hs-comment">-- The size is given in bytes.</span><span>
</span><span id="line-1550"></span><span class="hs-comment">--</span><span>
</span><span id="line-1551"></span><span class="hs-comment">-- The endianness is selected with the Bool# parameter: most significant</span><span>
</span><span id="line-1552"></span><span class="hs-comment">-- byte first (big-endian) if @1#@ or least significant byte first</span><span>
</span><span id="line-1553"></span><span class="hs-comment">-- (little-endian) if @0#@.</span><span>
</span><span id="line-1554"></span><span class="hs-comment">--</span><span>
</span><span id="line-1555"></span><span class="hs-comment">-- Null higher limbs are automatically trimed.</span><span>
</span><span id="line-1556"></span><span id="local-6989586621679034562"><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromByteArray%23"><span class="hs-identifier hs-type">bigNatFromByteArray#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034562"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679034562"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-1557"></span><span id="bigNatFromByteArray%23"><span class="annot"><span class="annottext">bigNatFromByteArray# :: forall s.
Word#
-&gt; BigNat# -&gt; Word# -&gt; Bool# -&gt; State# s -&gt; (# State# s, BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatFromByteArray%23"><span class="hs-identifier hs-var hs-var">bigNatFromByteArray#</span></a></span></span><span> </span><span id="local-6989586621679033754"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033754"><span class="hs-identifier hs-var">sz</span></a></span></span><span> </span><span id="local-6989586621679033753"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033753"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span id="local-6989586621679033752"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033752"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span id="local-6989586621679033751"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033751"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat# -&gt; Word# -&gt; State# s -&gt; (# State# s, BigNat# #)
forall s.
Word# -&gt; BigNat# -&gt; Word# -&gt; State# s -&gt; (# State# s, BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatFromByteArrayLE%23"><span class="hs-identifier hs-var">bigNatFromByteArrayLE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033754"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033753"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033752"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033751"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1558"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromByteArray%23"><span class="hs-identifier hs-var">bigNatFromByteArray#</span></a></span><span> </span><span id="local-6989586621679033750"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033750"><span class="hs-identifier hs-var">sz</span></a></span></span><span> </span><span id="local-6989586621679033749"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033749"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span id="local-6989586621679033748"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033748"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679033747"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033747"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; BigNat# -&gt; Word# -&gt; State# s -&gt; (# State# s, BigNat# #)
forall s.
Word# -&gt; BigNat# -&gt; Word# -&gt; State# s -&gt; (# State# s, BigNat# #)
</span><a href="GHC.Num.BigNat.html#bigNatFromByteArrayBE%23"><span class="hs-identifier hs-var">bigNatFromByteArrayBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033750"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033749"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033748"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679033747"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1559"></span><span>
</span><span id="line-1560"></span><span>
</span><span id="line-1561"></span><span>
</span><span id="line-1562"></span><span>
</span><span id="line-1563"></span><span class="hs-comment">-- | Create a BigNat# from a WordArray# containing /n/ limbs in</span><span>
</span><span id="line-1564"></span><span class="hs-comment">-- least-significant-first order.</span><span>
</span><span id="line-1565"></span><span class="hs-comment">--</span><span>
</span><span id="line-1566"></span><span class="hs-comment">-- If possible 'WordArray#', will be used directly (i.e. shared</span><span>
</span><span id="line-1567"></span><span class="hs-comment">-- /without/ cloning the 'WordArray#' into a newly allocated one)</span><span>
</span><span id="line-1568"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWordArray%23"><span class="hs-identifier hs-type">bigNatFromWordArray#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-1569"></span><span id="bigNatFromWordArray%23"><span class="annot"><span class="annottext">bigNatFromWordArray# :: BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWordArray%23"><span class="hs-identifier hs-var hs-var">bigNatFromWordArray#</span></a></span></span><span> </span><span id="local-6989586621679033745"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033745"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033744"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033744"><span class="hs-identifier hs-var">n0</span></a></span></span><span>
</span><span id="line-1570"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033743"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="hs-special">)</span><span>
</span><span id="line-1571"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatZero%23"><span class="hs-identifier hs-var">bigNatZero#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-1572"></span><span>
</span><span id="line-1573"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033742"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- i.e. wa is multiple of limb-size</span><span>
</span><span id="line-1574"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033741"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033743"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1575"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033745"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-1576"></span><span>
</span><span id="line-1577"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; BigNat#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033743"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679033740"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033740"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033739"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033739"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1578"></span><span>               </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Bool#
-&gt; BigNat#
-&gt; Bool#
-&gt; Bool#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Bool# -&gt; BigNat# -&gt; Bool# -&gt; Bool# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033740"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033745"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033743"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033739"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1579"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-1580"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033741"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033741"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033742"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033742"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#quotRemWord%23"><span class="hs-identifier hs-var">quotRemWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#sizeofByteArray%23"><span class="hs-identifier hs-var">sizeofByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033745"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1581"></span><span>                                 </span><span class="hs-identifier">WORD_SIZE_IN_BYTES##</span><span>
</span><span id="line-1582"></span><span>      </span><span class="hs-comment">-- find real size in Words by removing trailing null limbs</span><span>
</span><span id="line-1583"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033743"><span class="annot"><span class="annottext">n :: Word#
</span><a href="#local-6989586621679033743"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="#local-6989586621679033738"><span class="hs-identifier hs-var">real_size</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033744"><span class="hs-identifier hs-var">n0</span></a></span><span>
</span><span id="line-1584"></span><span>      </span><span id="local-6989586621679033738"><span class="annot"><span class="annottext">real_size :: Word# -&gt; Word#
</span><a href="#local-6989586621679033738"><span class="hs-identifier hs-var hs-var">real_size</span></a></span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-1585"></span><span>      </span><span class="annot"><a href="#local-6989586621679033738"><span class="hs-identifier hs-var">real_size</span></a></span><span> </span><span id="local-6989586621679033737"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033737"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-1586"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033745"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033737"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#minusWord%23"><span class="hs-operator hs-var">`minusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1587"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="#local-6989586621679033738"><span class="hs-identifier hs-var">real_size</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033737"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#minusWord%23"><span class="hs-operator hs-var">`minusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span>
</span><span id="line-1588"></span><span>      </span><span class="annot"><a href="#local-6989586621679033738"><span class="hs-identifier hs-var">real_size</span></a></span><span> </span><span id="local-6989586621679033736"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033736"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033736"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-1589"></span><span>
</span><span id="line-1590"></span><span>
</span><span id="line-1591"></span><span class="hs-comment">-- | Create a BigNat from a WordArray# containing /n/ limbs in</span><span>
</span><span id="line-1592"></span><span class="hs-comment">-- least-significant-first order.</span><span>
</span><span id="line-1593"></span><span class="hs-comment">--</span><span>
</span><span id="line-1594"></span><span class="hs-comment">-- If possible 'WordArray#', will be used directly (i.e. shared</span><span>
</span><span id="line-1595"></span><span class="hs-comment">-- /without/ cloning the 'WordArray#' into a newly allocated one)</span><span>
</span><span id="line-1596"></span><span class="annot"><a href="GHC.Num.BigNat.html#bigNatFromWordArray"><span class="hs-identifier hs-type">bigNatFromWordArray</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat"><span class="hs-identifier hs-type">BigNat</span></a></span><span>
</span><span id="line-1597"></span><span id="bigNatFromWordArray"><span class="annot"><span class="annottext">bigNatFromWordArray :: BigNat# -&gt; Word# -&gt; BigNat
</span><a href="GHC.Num.BigNat.html#bigNatFromWordArray"><span class="hs-identifier hs-var hs-var">bigNatFromWordArray</span></a></span></span><span> </span><span id="local-6989586621679033734"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033734"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033733"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033733"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat
</span><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-var">BN#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BigNat# -&gt; Word# -&gt; BigNat#
</span><a href="GHC.Num.BigNat.html#bigNatFromWordArray%23"><span class="hs-identifier hs-var">bigNatFromWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033734"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033733"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1598"></span><span>
</span><span id="line-1599"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1600"></span><span class="hs-comment">-- Instances</span><span>
</span><span id="line-1601"></span><span class="hs-comment">-------------------------------------------------</span><span>
</span><span id="line-1602"></span><span>
</span><span id="line-1603"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat"><span class="hs-identifier hs-type">BigNat</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1604"></span><span>   </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033728"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033728"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033727"><span class="annot"><span class="annottext">== :: BigNat -&gt; BigNat -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">==</span></a></span></span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033726"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033726"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatEq"><span class="hs-identifier hs-var">bigNatEq</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033728"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033726"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-1605"></span><span>   </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033725"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033725"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033724"><span class="annot"><span class="annottext">/= :: BigNat -&gt; BigNat -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">/=</span></a></span></span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033722"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033722"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatNe"><span class="hs-identifier hs-var">bigNatNe</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033725"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033722"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-1606"></span><span>
</span><span id="line-1607"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679033711"><span id="local-6989586621679033713"><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat"><span class="hs-identifier hs-type">BigNat</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1608"></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033709"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033709"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679033708"><span class="annot"><span class="annottext">compare :: BigNat -&gt; BigNat -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-operator hs-var hs-var hs-var hs-var">`compare`</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033706"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033706"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Ordering
</span><a href="GHC.Num.BigNat.html#bigNatCompare"><span class="hs-identifier hs-var">bigNatCompare</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033709"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033706"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-1609"></span><span>   </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033705"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033705"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033704"><span class="annot"><span class="annottext">&lt; :: BigNat -&gt; BigNat -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;</span></a></span></span><span>  </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033702"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033702"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatLt"><span class="hs-identifier hs-var">bigNatLt</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033705"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033702"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-1610"></span><span>   </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033701"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033701"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033700"><span class="annot"><span class="annottext">&lt;= :: BigNat -&gt; BigNat -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;=</span></a></span></span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033698"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033698"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatLe"><span class="hs-identifier hs-var">bigNatLe</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033701"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033698"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-1611"></span><span>   </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033697"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033697"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033696"><span class="annot"><span class="annottext">&gt; :: BigNat -&gt; BigNat -&gt; Bool
</span><a href="#local-6989586621679033696"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;</span></a></span></span><span>  </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033695"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033695"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatGt"><span class="hs-identifier hs-var">bigNatGt</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033697"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033695"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-1612"></span><span>   </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033694"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033694"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679033693"><span class="annot"><span class="annottext">&gt;= :: BigNat -&gt; BigNat -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;=</span></a></span></span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BN%23"><span class="hs-identifier hs-type">BN#</span></a></span><span> </span><span id="local-6989586621679033692"><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033692"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BigNat# -&gt; BigNat# -&gt; Bool
</span><a href="GHC.Num.BigNat.html#bigNatGe"><span class="hs-identifier hs-var">bigNatGe</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033694"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">BigNat#
</span><a href="#local-6989586621679033692"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-1613"></span><span>
</span><span id="line-1614"></span></pre></body></html>